Skip to content

Conversation

@ChrisDryden
Copy link
Collaborator

@ChrisDryden ChrisDryden commented Feb 12, 2026

This fixes an issue we have with our buffer writers where we do not flush the buffers before they are dropped which means that if there is an error when writing the buffers it will be suppressed. This change also adds the filename to the struct so that the error message is able to provide the file name to match the gnu implementation.

This should address the test tests/split/split-io-err

// file that was distributed with this source code.
// spell-checker:ignore xzaaa sixhundredfiftyonebytes ninetyonebytes threebytes asciilowercase ghijkl mnopq rstuv wxyz fivelines twohundredfortyonebytes onehundredlines nbbbb dxen ncccc rlimit NOFILE

use rand::{Rng, SeedableRng, rng};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I got a local clippy error for this, then I fixed it and now its failing in the CI? 🤔

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 12, 2026

Merging this PR will degrade performance by 67.52%

⚡ 1 improved benchmark
❌ 6 regressed benchmarks
✅ 277 untouched benchmarks
⏩ 38 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation split_lines 5.7 ms 6 ms -4.78%
Simulation split_bytes 507.8 µs 1,183.5 µs -57.09%
Simulation split_numeric_suffix 5.9 ms 6.1 ms -4.27%
Memory split_number_chunks 1,127.9 KB 231.9 KB ×4.9
Memory split_bytes 46.2 KB 142.4 KB -67.52%
Memory split_lines 46.2 KB 140.9 KB -67.19%
Memory split_numeric_suffix 78.4 KB 187.2 KB -58.13%

Comparing ChrisDryden:fix-split-io-err (9f69014) with main (dec633c)

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.

@ChrisDryden
Copy link
Collaborator Author

Its now passing the "tests/split/split-io-err" but the comment didn't succeed due to an issue with determining the prior gnu results

@ChrisDryden
Copy link
Collaborator Author

The performance decline can probably be helped with this: #10251

@ChrisDryden
Copy link
Collaborator Author

I'm trying a new approach that combines the two PR's, one that reuses the bufwriter and one that handles the errors correctly, I can split them up but wanted to see if the performance degradation is still there

@ChrisDryden
Copy link
Collaborator Author

Its a bit too much code, going to do the re-usable buffer PR before the GNU test fix PR, but just waiting to see the codspeed results

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/pr/bounded-memory. tests/pr/bounded-memory is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/split/filter. tests/split/filter is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/retry. tests/tail/retry is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/factor/t33 is no longer failing!
Congrats! The gnu test tests/factor/t34 is no longer failing!
Congrats! The gnu test tests/split/split-io-err is no longer failing!
Note: The gnu test tests/basenc/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/printf/printf-surprise is now passing!

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