Skip to content

Ignore files probing optimization: fetch directory entry metadata in batches#3410

Open
AlanIWBFT wants to merge 2 commits into
BurntSushi:masterfrom
AlanIWBFT:master
Open

Ignore files probing optimization: fetch directory entry metadata in batches#3410
AlanIWBFT wants to merge 2 commits into
BurntSushi:masterfrom
AlanIWBFT:master

Conversation

@AlanIWBFT
Copy link
Copy Markdown

@AlanIWBFT AlanIWBFT commented May 21, 2026

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.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant