Ignore files probing optimization: fetch directory entry metadata in batches#3410
Open
AlanIWBFT wants to merge 2 commits into
Open
Ignore files probing optimization: fetch directory entry metadata in batches#3410AlanIWBFT wants to merge 2 commits into
AlanIWBFT wants to merge 2 commits into
Conversation
…batches * On Windows probing the existence of each ignore file is very heavy. Windows prefers fetching metadata in batches (FindFirstFileExW/FindNextFileW, which translates to std::sys::fs::read_dir) * Now, in ignore::Work::read_dir, we read the entire directory at once, then use the result to determine the existense of ignore files. The result is saved and visited later
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.
This PR contains my fix to the issue #3293 I brought up. I was holding back making a PR (I made a fix but only linked in in the issue body) as nowadays owners are overwhelmed with AI generated PRs. But then someone popped up and made a PR with almost identical code: #3405 . So I feel forced to do it, especially when that branch contains a suspicious name
codex/prefetch-ignore-files.You can see the GitHub verified GPG signature showing initial submission date being Mar 11, 2026.