Unexpand use buffered reads + tests#10831
Conversation
|
do we need that many tests ? thanks |
|
Every test is a different edge case around the chunking process. I thought rather have a few more than a few too little. |
|
GNU testsuite comparison: |
|
yeah my point was that there is some duplications in the tests and they might be merged with a loop with different args / expectations |
Merging this PR will improve performance by 58.43%
Performance Changes
Comparing Footnotes
|
| #[allow(clippy::cognitive_complexity)] | ||
| fn unexpand_line( | ||
| buf: &mut Vec<u8>, | ||
| #[allow(clippy::too_many_arguments)] |
There was a problem hiding this comment.
for a different PR but it should be refactored
way too many arguments now
sylvestre
left a comment
There was a problem hiding this comment.
still waiting for some of the tests content to be deduplicated
|
Would be 1 function like this be acceptable? |
|
sure |
This comment was marked as resolved.
This comment was marked as resolved.
|
GNU testsuite comparison: |
5c37954 to
85a2122
Compare
tests/by-util/test_unexpand.rs
Outdated
There was a problem hiding this comment.
Would you add keywords cspell does not like?
There was a problem hiding this comment.
Yes i did, i am confused why cspell marks them as error. I double checked and behaviour is written correctly. Weird!
There was a problem hiding this comment.
Maybe, cspell accepts en_US only? behavior
85a2122 to
5b30a37
Compare
|
GNU testsuite comparison: |
5b30a37 to
cdff1df
Compare
|
GNU testsuite comparison: |
…utils#10831) * unexpand: use buffered read and new tests for chunking read edge case behaviour * unexpand: tests use no fixtures + fix edgecase where blanks are divided by chunk bounds * unexpand: shrink chunk read edgecase tests
New PR to fix issues after revert of #10798
Fix: #10698