Skip to content

split: preliminary for distinguishing read/write errors (& reflink)#13105

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:split-unbuf
Open

split: preliminary for distinguishing read/write errors (& reflink)#13105
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:split-unbuf

Conversation

@oech3

@oech3 oech3 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

GNU shows file path which caused I/O error. We need to separate out read/write instead of using std::io::copy to do same thing. Add copy method.
(This refactoring is useful for adding reflink support in the future BTW...)

@codspeed-hq

codspeed-hq Bot commented Jun 26, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 9.76%

⚡ 1 improved benchmark
✅ 322 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation split_bytes 311.7 µs 284 µs +9.76%

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 oech3:split-unbuf (efdb4c1) with main (bc24d39)2

Open in CodSpeed

Footnotes

  1. 46 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 (4bc3b68) during the generation of this report, so bc24d39 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@oech3 oech3 marked this pull request as ready for review June 26, 2026 18:59
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/tail/pipe-f is now being skipped but was previously passing.

Comment thread src/uu/split/src/split.rs
Strategy::Bytes(chunk_size) => {
let mut writer = ByteChunkWriter::new(chunk_size, settings)?;
copy(&mut reader, &mut writer)
Ok(writer.copy(&mut reader, io_blksize)?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

While CodSpeed reported performance gain, this is double buffered by BufReader. I'll fix it at different PR.

@oech3 oech3 marked this pull request as draft June 27, 2026 05:44
@oech3 oech3 marked this pull request as ready for review June 27, 2026 14:37
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.

1 participant