From: Clement Moyroud <clement.moyroud@gmail.com>
To: avarab@gmail.com
Cc: git@vger.kernel.org
Subject: Re: Git blame performance on files with a lot of history
Date: Mon, 17 Dec 2018 12:30:56 -0800 [thread overview]
Message-ID: <CABXAcUwCrJGTQHwbM0Pg59DudZ6vCtZYJT5W=YJVnGGE3Jijew@mail.gmail.com> (raw)
In-Reply-To: <87ftuz208b.fsf@evledraar.gmail.com>
On Fri, Dec 14, 2018 at 2:48 PM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
>
>
> 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
> 20240 ChangeLog
> $ git log --oneline -- ChangeLog | wc -l
> 2676
> $ git log --oneline | wc -l
> 165309
> $ time git blame ChangeLog >/dev/null
>
> real 0m1.977s
> user 0m1.909s
> sys 0m0.069s
>
> 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?
Hi Ævar,
I see around 3s here on the GCC repo, but I'm on a VM and the repo is
cloned on an NFS disk, so I'd say it matches :) It's around 45x faster
than my repo, on the same NFS share and VM. So there's definitely
something to improve here on my end (see my reply to Bryan re: repack
in a separate e-mail).
The anonymized export won't work in that case: all file contents are
replaced with 'anonymous blob <n>', so there's no per-line history for
blame to follow. Let me see if I can post-process a non-anonymized
version to keep the relevant data available.
Cheers,
Clément
prev parent reply other threads:[~2018-12-17 20:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 18:29 Git blame performance on files with a lot of history Clement Moyroud
2018-12-14 19:10 ` Bryan Turner
2018-12-17 20:43 ` Clement Moyroud
2018-12-14 21:31 ` Derrick Stolee
2018-12-17 20:59 ` Clement Moyroud
2018-12-14 22:48 ` Ævar Arnfjörð Bjarmason
2018-12-17 20:30 ` Clement Moyroud [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABXAcUwCrJGTQHwbM0Pg59DudZ6vCtZYJT5W=YJVnGGE3Jijew@mail.gmail.com' \
--to=clement.moyroud@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).