Skip to content
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

string-list: use ALLOC_GROW macro when reallocing string_list #991

Merged

Conversation

jeffhostetler
Copy link

Use ALLOC_GROW() macro when reallocing a string_list array
rather than simply increasing it by 32. This is a performance
optimization.

During status on a very large repo and there are many changes,
a significant percentage of the total run time was spent
reallocing the wt_status.changes array.

This change decreased the time in wt_status_collect_changes_worktree()
from 125 seconds to 45 seconds on my very large repository.

Signed-off-by: Jeff Hostetler jeffhost@microsoft.com

Use ALLOC_GROW() macro when reallocing a string_list array
rather than simply increasing it by 32.  This is a performance
optimization.

During status on a very large repo and there are many changes,
a significant percentage of the total run time was spent
reallocing the wt_status.changes array.

This change decreased the time in wt_status_collect_changes_worktree()
from 125 seconds to 45 seconds on my very large repository.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
@dscho
Copy link
Member

dscho commented Dec 12, 2016

Wow, that is an impressive performance improvement for such an innocuous change! Thanks!

@dscho dscho merged commit 6119d9b into git-for-windows:master Dec 12, 2016
dscho added a commit that referenced this pull request Dec 12, 2016
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
@dscho dscho modified the milestone: v2.11.1 Dec 22, 2016
dscho added a commit to git-for-windows/build-extra that referenced this pull request Dec 23, 2016
The `status` operation [was made
faster](git-for-windows/git#991) in large
worktrees with many changes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this pull request Jan 11, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 18, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 18, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Jan 18, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Jan 18, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Jan 18, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 24, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 24, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 24, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 25, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 25, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 25, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Jan 25, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
@jeffhostetler jeffhostetler deleted the jeffhostetler/string_list_realloc branch January 25, 2017 20:01
dscho added a commit to dscho/git that referenced this pull request Feb 1, 2017
…er/string_list_realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Feb 2, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Feb 2, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Feb 2, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Feb 2, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Feb 2, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Feb 3, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Mar 21, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 21, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 21, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Mar 22, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 23, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 24, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Mar 24, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 24, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 25, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Mar 26, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 27, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 27, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 28, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Mar 30, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 30, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 30, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Mar 30, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Apr 2, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Apr 12, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
dscho added a commit that referenced this pull request Apr 12, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Apr 13, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Apr 13, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Apr 17, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
git-for-windows-ci pushed a commit that referenced this pull request Apr 17, 2017
…realloc

string-list: use ALLOC_GROW macro when reallocing string_list
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.

None yet

2 participants