Skip to content

expand: remove read_until#10657

Merged
RenjiSann merged 1 commit intouutils:mainfrom
cerdelen:expand__buffer
Feb 4, 2026
Merged

expand: remove read_until#10657
RenjiSann merged 1 commit intouutils:mainfrom
cerdelen:expand__buffer

Conversation

@cerdelen
Copy link
Copy Markdown
Contributor

@cerdelen cerdelen commented Feb 2, 2026

When reading a file like /dev/zero that would never return a '\n' the read_until would never yield a buffer and therefore use up endless amount of space.

Using a static buffer we can read chunks and then process these chunks.

Fix: #10653

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 2, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 2, 2026

Merging this PR will improve performance by 6.63%

⚡ 1 improved benchmark
✅ 283 untouched benchmarks
⏩ 38 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation expand_custom_tabstops[50000] 25.1 ms 23.6 ms +6.63%

Comparing cerdelen:expand__buffer (0400116) with main (d41ed38)2

Open in CodSpeed

Footnotes

  1. 38 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.

  2. No successful run was found on main (1ea01a3) during the generation of this report, so d41ed38 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 2, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@RenjiSann
Copy link
Copy Markdown
Collaborator

LGTM, could you squash the commits in a single one before we merge ?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 2, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 2, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

expand: Edgecase fix

expand: spelling error in comment

expand: use byte literals instead of hex values for better readability
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 3, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/dd/no-allocate is now passing!

@RenjiSann RenjiSann merged commit 0589d2c into uutils:main Feb 4, 2026
292 of 306 checks passed
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.

expand:expand /dev/zero panic

2 participants