Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: b.murauer@posteo.de
Cc: git@vger.kernel.org
Subject: Re: bugreport: performance regression on git log --follow
Date: Wed, 4 Nov 2026 16:56:25 +0100	[thread overview]
Message-ID: <autVqTLs_pgwVcSE@pks.im> (raw)
In-Reply-To: <1491d49cdb1a96698e5572d9de3ac280@posteo.de>

On Wed, Nov 04, 2026 at 07:58:25AM +0000, b.murauer@posteo.de wrote:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> 
> I ran git log --follow on a single file in a repository with about 30k
> commits
> and 27k tracked files:
> 
>     git log --follow --oneline -- path/to/file.ts >/dev/null
> 
> VS Code's Timeline view runs a similar command automatically:
> 
>     git log --no-ext-diff --no-textconv --format=<format> -z -n551
> --shortstat \
>         --follow -- path/to/file.ts
> 
> We regularly merge older maintenance branches forward into main. The
> affected
> file was added on main and does not exist on those branches, so many merges
> have
> a parent that lacks it. The following command reports 692 commits for this
> file:
> 
>     git log --full-history -m --diff-filter=A --format=%h -- path/to/file.ts
> |
>         sort -u | wc -l
> 
> What did you expect to happen? (Expected behavior)
> 
> I expected the command to finish in a time comparable to earlier Git
> versions.
> With Git 2.43 on the same history, it takes about 1 second.
> 
> What happened instead? (Actual behavior)
> 
> With Git 2.56, the command takes around 10 minutes. It uses one CPU core
> for the whole run, with very little system time, and output appears slowly.

Thanks for your report! This is a known issue which was originally
reported at [1]. That thread also has some patches that are currently in
review.

Patrick

[1]: https://lore.kernel.org/git/as44NVKZA9C9S5ae@pks.im/

      reply	other threads:[~2026-11-04 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  7:58 bugreport: performance regression on git log --follow b.murauer
2026-11-04 15:56 ` Patrick Steinhardt [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=autVqTLs_pgwVcSE@pks.im \
    --to=ps@pks.im \
    --cc=b.murauer@posteo.de \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox