From: Brandon Williams Date: Wed, 04 Apr 2018 17:01:31 GMT Subject: Re: [PATCH 8/6] commit: use generation numbers for in_merge_bases() Message-ID: <20180404170131.GD100220@google.com> In-Reply-To: <14e4e1d3-5c77-dc7c-10d5-e9406b992f0e@gmail.com> On 04/04, Derrick Stolee wrote: > On 4/4/2018 11:45 AM, Derrick Stolee wrote: > > The containment algorithm for 'git branch --contains' is different > > from that for 'git tag --contains' in that it uses is_descendant_of() > > instead of contains_tag_algo(). The expensive portion of the branch > > algorithm is computing merge bases. > > > > When a commit-graph file exists with generation numbers computed, > > we can avoid this merge-base calculation when the target commit has > > a larger generation number than the target commits. > > > > Performance tests were run on a copy of the Linux repository where > > HEAD is contained in v4.13 but no earlier tag. Also, all tags were > > copied to branches and 'git branch --contains' was tested: > > > > Before: 60.0s > > After: 0.4s > > Rel %: -99.3% Now that is an impressive speedup. -- Brandon Williams