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
{{ message }}
Repository navigation
Git status spawns one process per untracked file #1489
Workspace.getStatus() runs git diff --no-index --numstat once for every untracked file. Large generated directories can therefore create thousands of Git child processes during automatic status refreshes.
Measured impact
A workspace with 43,832 untracked .pnpm-store files produced:
3,866 Git children during an 8-second trace
909 Git children during a 3-second trace
roughly 300–480 Git launches per second
repeated host-daemon event-loop stalls between 500 ms and 1,885 ms
The caller can time out while the daemon continues the scan. A queued trailing refresh can then start another scan.
Affected paths
packages/host-workspace/src/workspace.ts: readUntrackedNumstatEntries() from getStatus()
readUntrackedDiffFileStats() repeats one Git process per untracked file
readUntrackedDiffArtifacts() can run three Git commands per untracked file
server file-count limits run after the daemon completes this work
The status behavior came from d4127a0a1 (#113). The paginated diff behavior came from 27c4e371c (#91).
Suggested change
For automatic status, keep untracked file paths but omit exact line counts. Compute exact untracked patches only on demand, with limits applied before child processes start.
Also propagate request cancellation to the daemon and active Git children. Coalesce replacement refreshes without running an expired scan again.
T3 Code uses this simpler status shape: one porcelain status command plus tracked numstat commands. It records untracked paths without one Git command per path.
I implemented the focused fix in BBamir PR budah1987#47.
The patch keeps untracked paths in automatic status, but leaves their line counts unknown. It also moves the 5,000-file guard before per-file diff work and adds server-to-daemon cancellation.
A 2,000-untracked-file benchmark fell from 2,009 expected Git processes to 9 measured processes. Patched status runs completed in 110–128 ms.
Activity
budah1987 commentedon Aug 13, 2026
I implemented the focused fix in BBamir PR budah1987#47.
The patch keeps untracked paths in automatic status, but leaves their line counts unknown. It also moves the 5,000-file guard before per-file diff work and adds server-to-daemon cancellation.
A 2,000-untracked-file benchmark fell from 2,009 expected Git processes to 9 measured processes. Patched status runs completed in 110–128 ms.
Bound untracked status and diff work (#1496)