Skip to content

sort: remove procfs dependency and fix percent parsing bugs in parse_size#10806

Open
ChrisDryden wants to merge 2 commits intouutils:mainfrom
ChrisDryden:fix-procfs-and-percent-bugs
Open

sort: remove procfs dependency and fix percent parsing bugs in parse_size#10806
ChrisDryden wants to merge 2 commits intouutils:mainfrom
ChrisDryden:fix-procfs-and-percent-bugs

Conversation

@ChrisDryden
Copy link
Collaborator

There were quite a few bugs in the implementation of the memory sorting option and it was not working as expected outlined in: #10803 I started investigating it to see if it was possible to remove this dependency because it brings in a bunch of other dependencies like chronos and we only use the procfs dependency just for this one function.

When I investigated how this function was implemented, it was simply reading the file iterating through all of the lines and splitting. Whats great is that since it wasn't working in the first place it means that theres no way this PR could introduce a regression.

These are all of the dependencies that would be removed from all of the parse_size users:

procfs, procfs-core, chrono, iana-time-zone, flate2, miniz_oxide, adler2, crc32fast, simd-adler32.

Fixes: #10803

@ChrisDryden ChrisDryden force-pushed the fix-procfs-and-percent-bugs branch from 29230a2 to 88dbe19 Compare February 7, 2026 20:20
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 8, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 3.51%

Comparing ChrisDryden:fix-procfs-and-percent-bugs (0b32aaa) with main (52a5b48)

Summary

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

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation sort_long_line[160000] 1.4 ms 1.4 ms +3.51%

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.

@sylvestre
Copy link
Contributor

Some jobs are failing

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.

parse_percent_values always setting percentage to 0 doing double multiplication to 1024

2 participants