forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dir.c: make add_excludes aware of fscache during status #1344
Merged
dscho
merged 1 commit into
git-for-windows:master
from
jeffhostetler:perf_add_excludes_with_fscache
Nov 1, 2017
Merged
dir.c: make add_excludes aware of fscache during status #1344
dscho
merged 1 commit into
git-for-windows:master
from
jeffhostetler:perf_add_excludes_with_fscache
Nov 1, 2017
Conversation
This file contains 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
Teach read_directory_recursive() and add_excludes() to be aware of optional fscache and avoid trying to open() and fstat() non-existant ".gitignore" files in every directory in the worktree. The current code in add_excludes() calls open() and then fstat() for a ".gitignore" file in each directory present in the worktree. Change that when fscache is enabled to call lstat() first and if present, call open(). This seems backwards because both lstat needs to do more work than fstat. But when fscache is enabled, fscache will already know if the .gitignore file exists and can completely avoid the IO calls. This works because of the lstat diversion to mingw_lstat when fscache is enabled. This reduced status times on a 350K file enlistment of the Windows repo on a NVMe SSD by 0.25 seconds. Signed-off-by: Jeff Hostetler <[email protected]>
Thank you! |
dscho
added a commit
to git-for-windows/build-extra
that referenced
this pull request
Nov 2, 2017
Operations in massively-sparse worktrees [are now much faster of `core.fscache = true`](git-for-windows/git#1344). Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
that referenced
this pull request
Nov 6, 2017
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 7, 2017
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Nov 29, 2017
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Dec 6, 2017
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Jan 2, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Jan 18, 2018
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 20, 2018
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 22, 2018
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 22, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Jan 22, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Feb 16, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Mar 23, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Apr 3, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
May 29, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
May 29, 2018
…cache dir.c: make add_excludes aware of fscache during status
PKRoma
pushed a commit
to PKRoma/git-for-windows
that referenced
this pull request
Jun 22, 2018
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
PKRoma
pushed a commit
to PKRoma/git-for-windows
that referenced
this pull request
Jun 22, 2018
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
PKRoma
pushed a commit
to PKRoma/git-for-windows
that referenced
this pull request
Jun 22, 2018
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Aug 22, 2018
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
to dscho/git
that referenced
this pull request
Dec 30, 2024
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
to dscho/git
that referenced
this pull request
Dec 30, 2024
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
to dscho/git
that referenced
this pull request
Dec 30, 2024
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Dec 31, 2024
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Dec 31, 2024
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 1, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 1, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 1, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 1, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 1, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 2, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 2, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 2, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 3, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 6, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 6, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 7, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 7, 2025
…cache dir.c: make add_excludes aware of fscache during status
Merged
dscho
added a commit
to dscho/git
that referenced
this pull request
Jan 7, 2025
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
to dscho/git
that referenced
this pull request
Jan 7, 2025
…xcludes_with_fscache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 7, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 7, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 8, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 8, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 8, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 8, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 9, 2025
…cache dir.c: make add_excludes aware of fscache during status
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 9, 2025
…cache dir.c: make add_excludes aware of fscache during status
dscho
added a commit
that referenced
this pull request
Jan 17, 2025
…cache dir.c: make add_excludes aware of fscache during status
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.
Teach read_directory_recursive() and add_excludes() to
be aware of optional fscache and avoid trying to open()
and fstat() non-existant ".gitignore" files in every
directory in the worktree.
The current code in add_excludes() calls open() and then
fstat() for a ".gitignore" file in each directory present
in the worktree. Change that when fscache is enabled to
call lstat() first and if present, call open().
This seems backwards because both lstat needs to do more
work than fstat. But when fscache is enabled, fscache will
already know if the .gitignore file exists and can completely
avoid the IO calls. This works because of the lstat diversion
to mingw_lstat when fscache is enabled.
This reduced status times on a 350K file enlistment of the
Windows repo on a NVMe SSD by 0.25 seconds.
Signed-off-by: Jeff Hostetler [email protected]