Skip to content

sort: defer compress program errors until needed - #13656

Open
wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:sort-compress-error-priority
Open

sort: defer compress program errors until needed#13656
wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:sort-compress-error-priority

Conversation

@wtcpython

Copy link
Copy Markdown
Contributor

Fixes #13148.

Defer reporting compression program errors until external sorting is required, allowing earlier input errors to be reported without an unrelated compression warning.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!

@wtcpython
wtcpython force-pushed the sort-compress-error-priority branch from d468737 to 8ab9b62 Compare August 5, 2026 09:35
@codspeed-hq

codspeed-hq Bot commented Aug 5, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 3.97%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
✅ 351 untouched benchmarks
⏩ 50 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation du_summarize_balanced_tree[(5, 4, 10)] 16.5 ms 15.8 ms +4.1%
Simulation du_wide_tree[(5000, 500)] 20.2 ms 19.5 ms +3.84%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing wtcpython:sort-compress-error-priority (a97b03b) with main (2c9a666)

Open in CodSpeed

Footnotes

  1. 50 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@wtcpython
wtcpython force-pushed the sort-compress-error-priority branch 3 times, most recently from 828477d to 95b0ea3 Compare August 10, 2026 15:00
@wtcpython
wtcpython force-pushed the sort-compress-error-priority branch from 95b0ea3 to 9fe5d79 Compare August 14, 2026 03:20
@github-actions

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 148.97 MB (-132 KB, -0.09%)

Significant per-binary changes:
  [           1.10 MB ->    1.18 MB  (+76 KB, +6.74%)
  test        1.10 MB ->    1.18 MB  (+76 KB, +6.74%)
  install     1.25 MB ->    1.32 MB  (+72 KB, +5.62%)
  mkdir       1.10 MB ->    1.17 MB  (+72 KB, +6.38%)
  mkfifo      1.09 MB ->    1.16 MB  (+72 KB, +6.45%)
  mknod       1.10 MB ->    1.17 MB  (+72 KB, +6.41%)
  chmod       1.15 MB ->    1.22 MB  (+68 KB, +5.76%)

@wtcpython
wtcpython force-pushed the sort-compress-error-priority branch from 9fe5d79 to d14f018 Compare August 16, 2026 13:56
@wtcpython

Copy link
Copy Markdown
Contributor Author

Would you mind taking a look when convenient? Thanks!

Comment thread src/uu/sort/src/ext_sort/threaded.rs Outdated
if let Some((prog, err)) = compress_prog_error {
let _ = writeln!(
stderr(),
"sort: could not run compress program '{prog}': {}",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the translate macro

"nonexistent-program",
"-S",
"10",
"1K",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems unrelated

@wtcpython
wtcpython force-pushed the sort-compress-error-priority branch from d14f018 to a97b03b Compare August 17, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minorbug(sort): priotize the compress program over files

2 participants