Re: [PATCH] revision.c: reduce object database queries
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 25, 2018, 01:41 UTC
- Message-ID
- <e70fe6eb-994a-66b0-3c20-d19ea6635e07@gmail.com>
- In-Reply-To
- <1519522496-73090-1-git-send-email-dstolee@microsoft.com>
On 2/24/2018 8:34 PM, Derrick Stolee wrote:
Show 14 quoted lines
> In mark_parents_uninteresting(), we check for the existence of an > object file to see if we should treat a commit as parsed. The result > is to set the "parsed" bit on the commit. > > Modify the condition to only check has_object_file() if the result > would change the parsed bit. > > When a local branch is different from its upstream ref, "git status" > will compute ahead/behind counts. This uses paint_down_to_common() > and hits mark_parents_uninteresting(). On a copy of the Linux repo > with a local instance of "master" behind the remote branch > "origin/master" by ~60,000 commits, we find the performance of > "git status" went from 1.42 seconds to 1.32 seconds, for a relative > difference of -7.0%.
I do want to add that the exact same "git status" performance test with the commit-graph feature goes from 0.29 seconds to 0.21 seconds for a relative change of -27.5%.
Thanks,
-Stolee