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
diffcore-rename: speed up register_rename_src #996
Merged
dscho
merged 1 commit into
git-for-windows:master
from
jeffhostetler:jeffhostetler/register_rename_src
Dec 22, 2016
Merged
diffcore-rename: speed up register_rename_src #996
dscho
merged 1 commit into
git-for-windows:master
from
jeffhostetler:jeffhostetler/register_rename_src
Dec 22, 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
This took 3 seconds off of a status on my large test repo. |
dscho
reviewed
Dec 22, 2016
@@ -94,6 +106,7 @@ static struct diff_rename_src *register_rename_src(struct diff_filepair *p) | |||
first = next+1; | |||
} | |||
|
|||
found_it: |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Teach register_rename_src() to see if new file pair can simply be appended to the rename_src[] array before performing the binary search to find the proper insertion point. This is a performance optimization. This routine is called during run_diff_files in status and the caller is iterating over the sorted index, so we should expect to be able to append in the normal case. The existing insert logic is preserved so we don't have to assume that, but simply take advantage of it if possible. Signed-off-by: Jeff Hostetler <[email protected]>
jeffhostetler
force-pushed
the
jeffhostetler/register_rename_src
branch
from
December 22, 2016 15:24
3fd661a
to
8ab41d0
Compare
Thanks! |
dscho
added a commit
to git-for-windows/build-extra
that referenced
this pull request
Dec 23, 2016
The `diff` operation saw [performance improvements](git-for-windows/git#996) when working on a huge number of renamed files. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
that referenced
this pull request
Jan 11, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 18, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 18, 2017
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 18, 2017
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 18, 2017
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 18, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 24, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 24, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 24, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 25, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
to dscho/git
that referenced
this pull request
Feb 1, 2017
…er/register_rename_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 2, 2017
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 2, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 2, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 2, 2017
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 2, 2017
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 8, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 14, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 14, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 15, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 15, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 18, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 20, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 20, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 21, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Jan 21, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 2, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 5, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 8, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 9, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
to dscho/git
that referenced
this pull request
Feb 9, 2021
…er/register_rename_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 10, 2021
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 11, 2021
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 11, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 25, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Feb 26, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Mar 4, 2021
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 5, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Mar 6, 2021
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 8, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
to dscho/git
that referenced
this pull request
Mar 9, 2021
…er/register_rename_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Mar 10, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Mar 10, 2021
…ame_src diffcore-rename: speed up register_rename_src
git-for-windows-ci
pushed a commit
that referenced
this pull request
Mar 10, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Mar 12, 2021
…ame_src diffcore-rename: speed up register_rename_src
dscho
added a commit
that referenced
this pull request
Mar 16, 2021
…ame_src diffcore-rename: speed up register_rename_src
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 register_rename_src() to see if new file pair
can simply be appended to the rename_src[] array before
performing the binary search to find the proper insertion
point.
This is a performance optimization. This routine is called
during run_diff_files in status and the caller is iterating
over the sorted index, so we should expect to be able to
append in the normal case. The existing insert logic is
preserved so we don't have to assume that, but simply take
advantage of it if possible.
Signed-off-by: Jeff Hostetler [email protected]