Re: Git blame performance on files with a lot of history
- Date: Fri, 14 Dec 2018 23:48:52 +0100
- From: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
- Subject: Re: Git blame performance on files with a lot of history
On Fri, Dec 14 2018, Clement Moyroud wrote:
> My group at work is migrating a CVS repo to Git. The biggest issue we
> face so far is the performance of git blame, especially compared to
> CVS on the same file. One file especially causes us trouble: it's a
> 30k lines file with 25 years of history in 3k+ commits. The complete
> repo has 200k+ commits over that same period of time.
There's a real-world repo with a shape & size very similar to this that
has good performance, gcc.git: https://github.com/gcc-mirror/gcc
$ wc -l ChangeLog
$ git log --oneline -- ChangeLog | wc -l
$ git log --oneline | wc -l
$ time git blame ChangeLog >/dev/null
Its history began in 1997, and the changes to the ChangeLog file by its
nature is fairly evenly spread through that period.
So check out that repo to see if you have similar or worse
performance. Does your work repo show the same problem with a history
produced with 'git fast-export --anonymize', and if so is that something
you'd be OK with sharing?