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
read-cache: speed up add_index_entry during checkout #988
Merged
dscho
merged 2 commits into
git-for-windows:master
from
jeffhostetler:jeffhostetler/quick_add_index_entry
Dec 12, 2016
Merged
read-cache: speed up add_index_entry during checkout #988
dscho
merged 2 commits into
git-for-windows:master
from
jeffhostetler:jeffhostetler/quick_add_index_entry
Dec 12, 2016
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
I marked this WIP for now because I think it'll need some tests. This change sped up a "git checkout -b new" (new branch name, same commit) by 2.5 seconds on my very large repo. |
Teach add_index_entry_with_check() and has_dir_name() to see if the path of the new item is greater than the last path in the index array before attempting to search for it. This is a performance optimization. During checkout, merge_working_tree() populates the new index in sorted order, so this change saves at least 2 lookups per file. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
jeffhostetler
force-pushed
the
jeffhostetler/quick_add_index_entry
branch
from
December 8, 2016 15:56
1705311
to
3afab69
Compare
jeffhostetler
changed the title
WIP read-cache: speed up add_index_entry during checkout
read-cache: speed up add_index_entry during checkout
Dec 9, 2016
This also improved read-tree by 15% on my large repo. |
Thanks, and sorry for the delay! |
dscho
added a commit
that referenced
this pull request
Dec 12, 2016
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
to git-for-windows/build-extra
that referenced
this pull request
Dec 23, 2016
The `checkout` operation [was speeded up](git-for-windows/git#988) for the common cases. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
added a commit
that referenced
this pull request
Jan 11, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 18, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 18, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 18, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 18, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 18, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 24, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 24, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 24, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
to dscho/git
that referenced
this pull request
Feb 1, 2017
…er/quick_add_index_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Feb 2, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 21, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Mar 22, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 23, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 24, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Mar 24, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 24, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 25, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Mar 26, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 27, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 27, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 28, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Mar 30, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 30, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 30, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 30, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Apr 2, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Apr 12, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Apr 12, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Apr 13, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Apr 13, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
dscho
added a commit
that referenced
this pull request
Apr 16, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Apr 17, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Apr 17, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
git-for-windows-ci
pushed a commit
that referenced
this pull request
Apr 17, 2017
…dex_entry read-cache: speed up add_index_entry during checkout
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 add_index_entry_with_check() and has_dir_name()
to see if the path of the new item is greater than the
last path in the index array before attempting to search
for it.
This is a performance optimization.
During checkout, merge_working_tree() populates the new
index in sorted order, so this change saves at least 2
lookups per file.
Signed-off-by: Jeff Hostetler jeffhost@microsoft.com