You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: Replace gix-index + filesystem walk with parallel git subprocesses
Build RepoGitIndex from parallel git subprocesses for the tracked
index (ls-tree + diff-index) and a race between walk_candidate_files
and git ls-files for untracked file discovery.
Four operations run concurrently:
- git ls-tree -r HEAD -z (blob OIDs, ~60-110ms)
- git diff-index HEAD -z (modified/deleted, ~95-150ms)
- walk_candidate_files (8-thread walk, ~440ms macOS / ~474ms Linux)
- git ls-files --others -z (single-thread, ~530ms macOS / ~231ms Linux)
The two untracked approaches race via mpsc channel. On macOS, the
multi-threaded walk wins. On Linux, git's optimized subprocess wins.
Using whichever finishes first guarantees no regressions on either
platform.
Benchmark (110-package monorepo, 30 runs, sandboxed Linux):
baseline: 878ms ± 27ms
improved: 437ms ± 7ms (2.01x faster)
0 commit comments