From: Junio C Hamano Date: Tue, 15 Jul 2008 22:25:29 GMT Subject: Re: [RFC/PATCH 0/2] Enhance performance of blame -C -C Message-ID: <7vhcaqzsx2.fsf@gitster.siamese.dyndns.org> In-Reply-To: <200807160158.34994.angavrilov@gmail.com> Alexander Gavrilov writes: > This pair of patches aims at increasing performance of copy detection in > blame by avoiding unnecessary comparisons. Note that since I'm new to > this code, I might have misunderstood something. > > There are two cases than I aim to fix: > > 1) Copy detection is done by comparing all outstanding chunks of the > target file to all blobs in the parent. After that, chunks with suitable > matches are split, and comparison is repeated again, until there are no > new matches. The trouble is, chunks that didn't match the first time, > and weren't split, are compared against the same set of blobs again and > again. I add a flag to track that. > > On my test case it decreased blame -C -C time from over 10min to > ~6min; 4min with -C80. > > 2) Chunks are split only if the match scores above a certain > threshold. I understand that a split of an entry cannot score more than > the entry itself. Thus, it is pointless to even try doing costly > comparisons for small entries. > > (Time goes down to 4min; 2min with -C80) Ideas for both patches sound very sane. Will take a deeper look later. Thanks.