perf(vcs): status on 20,000 files from 54 ms to 16 ms (git: 15 ms)
Radin committed
- Author
- Radin · radin@coline.appOct 28, 2026 at 03:32
- Committer
- Radin · radin@coline.appOct 28, 2026 at 03:32
- Parents
- c6f876c64815
perf(vcs): status on 20,000 files from 54 ms to 16 ms (git: 15 ms) - The folder walk is our own: folders read in parallel on rayon's work-stealing pool, .gitignore rules per folder, each folder's files handed over once. The ignore crate's walker napped 1 ms at a time waiting for work and took a lock per file. - One pass over the sorted walk and the sorted index gives each file's state, the new files and the tracked files the walk skipped, instead of three lookups per file. - Mine rules (.env and the like) are checked on new files only, and on every file when the rules change; main's paths are read only when a file looks like one. - Nothing changed (what a status or a land usually finds): the index's tree stands and nothing is rebuilt or rewritten. - The index loads in one go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed+196−96