Repository navigation
perf(disk-usage): scan on the shared parallel engine - #276
Conversation
|
Damn man, 2 perf PR in a day. |
|
The description now contains the required template structure. |
There was a problem hiding this comment.
Talia preliminary review
| Check | Result |
|---|---|
| Merge score | 🟢 4/5 — No issues found; likely ready after CI and human review |
| Findings | None found |
| Review depth | 3/5 — how thoroughly the changed code could be checked by reading it |
| Coverage | 29 of 29 changed files reviewed |
What Talia checked: Reviewed the new parallel walker, disk-usage tree/limit/hardlink accounting, storage-kind parsing, folder-totals migration, and UI/settings/doc wiring; no concrete introduced defect was supported. Remaining uncertainty is runtime concurrency behavior, which static inspection cannot fully establish.
Run details
- Commit reviewed: 649f99c
- Source lookups: 80 file reads, 43 searches
- Prompt version: 859b7490ca3d
Preliminary automated review: Talia read the changed code and related source; nothing was built, run or tested, and AI can make mistakes. It is not a scope acceptance or a promise to merge; a human reviewer makes the final call. See our ethos.
|
Very nice, thx. I've added a commit that merges the two adjacent anonymous namespaces in |
Summary
Disk Usage now scans on several threads. It is about 5× faster, uses 36–53% less memory, and gives the same totals as before. On an SSD it also uses more threads, which makes a first scan, before the files are cached, about 1.6–2.6× faster than with one thread per core. A new Disk Usage Limit setting (Settings → Views) chooses how many items a scan covers, including No Limit. A file with several hard links now always shows its size under the same name, and the footer says when items changed during the scan.
Motivation
Large folders took several seconds to analyze, and a fixed 2 million item cap meant big system folders could never be analyzed fully. Disk Usage now uses the same multi-threaded scanner as folder sizes, so fixes to one apply to both.
Type of Change
Testing
Measured on a 6-core, 12-thread laptop with an NVMe SSD, using the new
luciole-disk-usage-bench(-Dbenchmarks=true).Repeat scans (files already cached). Time is the median of five runs; memory is the peak of one scan.
/nix/storeFirst scans (cache cleared before each run). The new scanner with one thread per core, as folder sizes use, compared with this PR's choice on SSDs. Each figure is the range of two runs.
/nix/storeluciole-folder-totals-benchgives the same times and totals as before./report nothing.just lint,just format-checkandjust i18n-checkpass.Checklist
SCOPE.md, or its scope was agreed in an issue or on Discord first.CONTRIBUTING.md.just format, or this PR has no C++ changes.just lintand the relevant build or test commands, or explained why they were not run.just role-alpha-check, or this PR does not change UI colors.docs/, or this PR does not change user-facing behavior or settings.Additional Notes
Speed
Threads
Memory
Behaviour