Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Listing a directory with 5,000 mixed files starts six sequential Git processes to check ignore rules. Paths already go through stdin, but each process handles at most 1,000 children.
This raises the limit to 10,000 paths per process, capped at 1 MiB of UTF-8 input including NUL separators. The parent-ignore shortcut from #20062 still starts above 1,000 children. If Git rejects a batch, retry in 1,000-path groups to keep labels from earlier successful groups.
Windows measurements
Full
WorkspaceEntries.listcalls with real Git and isolated synthetic fixtures. Two warm-up pairs, then 20 alternating pairs per scenario. These are arithmetic means against main atfa31b66. Returned objects matched in every pair, output was untruncated, and the fixture index stayed unchanged.Git calls fell from 6 to 2 for 5,000 mixed files, 14 to 3 for 12,501 entries, and 6 to 3 for 261-byte paths. The UTF-8 stress case still took 4 calls; both controls took 1. The controls and UTF-8 stress case show no meaningful gain.
Per-path work and total input/output bytes stayed the same in normal cases. The largest PR input and output were 1,048,383 bytes each. Larger batches use larger buffers and retain the 10-second timeout and 16 MiB output cap. A timeout can discard more ignore labels. Fatal retries also add work: the error probe attempted 8,004 paths versus 6,002 on main.
Measured on Windows 10.0.26300, Ryzen 5 5600, 32 GiB RAM, Node 24.18.0 and Git 2.41.0.windows.1. CPU, UI, native macOS/Linux and slow filesystems were not measured.
Verification
vp test run apps/server/src/workspace/WorkspaceEntries.test.tspassed, 23 cases. The extended wide-directory case fails on main because it launches too many Git processes. POSIX-only cases return early on Windows.vp run check:changed origin/mainpassed formatting, lint, knip, scoped typechecks and 24 adjacent cases. The final focused tests, targeted format/lint and scoped server typecheck also passed.Real Git probes confirmed cleanup on cancellation and timeout. A probe that made Git reject a later path returned the same 5,999 ignore labels as main. The POSIX-only filename test still needs a macOS or Linux run.
Reproduce the measurements
Save this as
measure.mjsin a fresh directory outside the checkout. Install this PR's dependencies withvp i, then runnode /absolute/path/to/measure.mjsfrom the checkout root using Node 24.18.0. The script creates synthetic files, compares fixed main source with the checkout source, and writes raw samples and summary JSON beside itself. It starts no server and uses no live T3 state.The reported run reused the same unchanged synthetic fixture after the changed-file checks finished. This script builds that fixture afresh. Timings exclude setup and result comparison.
Implemented and reviewed with gpt-6.1-sol through the Codex harness in T3 Code.