Re: git blame vs git log --follow performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 27, 2014 at 4:10 AM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> Is there something that can be done about improving
> git log --follow -- <file> performance to be nearly
> equivalent speed to git blame -- <file> ?

Not strictly about --follow, but there is room for improvement for
diff'ing in log in general. Right now we do "diff HEAD HEAD~1", "diff
HEAD~1 HEAD~2" and so on (--follow needs diff to detect rename). At
each step we load new tree objects and reparse. Notice after "diff
HEAD HEAD~1" we may have "HEAD~1" and its subtrees read and parsed
(not entirely). We could reuse that "diff HEAD~1 HEAD~2".

On git.git, "git log --raw" takes 10s and it seems tree object reading
is about 2s.In ideal case we might be able to cut that to 1s. The tree
parsing code (update_tree_entry) takes about 5s. We might be able to
cut that in half, I'm not entirely sure. But there could be a lot of
work in caching "HEAD~1" and the overhead may turn out too high for
any gain.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]