Skip to content

Conversation

@ChrisDryden
Copy link
Collaborator

Surprisingly I think that this line here is one of the biggest contributors to the flakiness in the valgrind GNU tests. When I look at the memory allocations when shuf is run, this line here is a duplicated call to setup_localization that doubles the amount of allocations for the loading of the fluent files and by removing it the time it takes to load valgrind reduces by 50%.

The best long term fix here would be to implement lazy loading for the translations to only load the translations when they're needed, but hopefully this will increase the stability of the GNU tests for now and should bring some major memory and performance benefits to every utility call.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/misc/io-errors. tests/misc/io-errors is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/pr/bounded-memory. tests/pr/bounded-memory is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/factor/t36 is no longer failing!
Note: The gnu test tests/tail/tail-n0f is now being skipped but was previously passing.
Congrats! The gnu test tests/printf/printf-surprise is now passing!

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 13, 2026

Merging this PR will degrade performance by 4.94%

⚡ 114 improved benchmarks
❌ 3 regressed benchmarks
✅ 167 untouched benchmarks
⏩ 38 skipped benchmarks1

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

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation wc_chars_large_line_count[100000] 1,023 µs 912.2 µs +12.14%
Simulation wc_lines_variable_length[(50, 500)] 3.5 ms 3.3 ms +3.29%
Simulation wc_lines_large_line_count[500000] 2.9 ms 2.8 ms +3.94%
Simulation wc_bytes_synthetic[500] 194.7 µs 84.4 µs ×2.3
Simulation wc_lines_extreme_line_lengths[(100000, 200)] 1.6 ms 1.5 ms +6.35%
Simulation sort_ascii_c_locale 18.2 ms 18.8 ms -3.18%
Simulation sort_ascii_utf8_locale 18 ms 17.2 ms +4.51%
Simulation sort_long_line[160000] 1.4 ms 1.3 ms +6.91%
Simulation b64_decode_synthetic 171.7 µs 59.9 µs ×2.9
Simulation b64_encode_synthetic 167.7 µs 59.3 µs ×2.8
Simulation b64_decode_ignore_garbage_synthetic 168.7 µs 62.1 µs ×2.7
Simulation cksum_blake3 216.9 µs 113.2 µs +91.59%
Memory b64_decode_ignore_garbage_synthetic 46.2 KB 12.1 KB ×3.8
Memory b64_encode_synthetic 46.2 KB 8.6 KB ×5.4
Memory b64_decode_synthetic 46.2 KB 12.1 KB ×3.8
Memory file_tz_abbreviations 333.4 KB 288.4 KB +15.6%
Memory complex_relative_date 46.1 KB 16.9 KB ×2.7
Memory single_date_now 46.1 KB 15.6 KB ×3
Memory file_custom_format 46.2 KB 20.1 KB ×2.3
Memory file_iso_dates 46.2 KB 19.5 KB ×2.4
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing ChrisDryden:fix-redundant-locale-init (512f95a) 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

Closing in favor of the clap delayed translation loading: #10911

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