Git development
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [BUG] "git describe --match" performance
Date: Thu, 31 Oct 2024 08:10:00 -0700	[thread overview]
Message-ID: <20241031151000.svsa7d2ogcdz7hf6@jpoimboe> (raw)
In-Reply-To: <20241031114731.GA608553@coredump.intra.peff.net>

On Thu, Oct 31, 2024 at 07:47:31AM -0400, Jeff King wrote:
> On Tue, Oct 29, 2024 at 09:43:22PM -0700, Josh Poimboeuf wrote:
> 
> > $ time git describe --match=v6.10-rc7 --debug
> > describe HEAD
> > No exact match on refs or tags, searching to describe
> > finished search at d8470b7c13e11c18cf14a7e3180f0b00e715e4f0
> >  annotated       1844 v6.10-rc7
> > traversed 1282750 commits
> > v6.10-rc7-1844-gc61e41121036
> > 
> > real	0m9.243s
> > user	0m8.940s
> > sys	0m0.268s
> > 
> > $ time git describe
> > v6.10-rc7-1844-gc61e41121036
> > 
> > real	0m0.149s
> > user	0m0.111s
> > sys	0m0.036s
> 
> There's more discussion of the actual solution in the nearby thread from
> Rasmus. But I did want to note one thing here: when I initially tried to
> reproduce your problem, my "slow" case was a lot less bad.
> 
> The reason is that I had a commit graph file to speed up traversal. So
> independent of the git-describe fix, you might want to try:
> 
>   git commit-graph write --reachable
> 
> That reduces the slow case for me by a factor of 10. And likewise other
> traversal operations should get faster.
> 
> I think we'll build the commit graph file by default these days when you
> run "git gc". But we don't build it immediately after cloning. Perhaps
> we should change that.

Hm... I actually ran "git gc" and it didn't seem to help at all.

-- 
Josh

  reply	other threads:[~2024-10-31 15:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30  4:43 [BUG] "git describe --match" performance Josh Poimboeuf
2024-10-31 11:47 ` Jeff King
2024-10-31 15:10   ` Josh Poimboeuf [this message]
2024-10-31 15:31     ` Jeff King
2024-10-31 16:25       ` Josh Poimboeuf
2024-10-31 17:05         ` Jeff King
2024-10-31 19:01           ` Taylor Blau
2024-10-31 16:14   ` Kristoffer Haugsbakk
2024-10-31 17:20     ` Jeff King
2024-10-31 19:00   ` Taylor Blau

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=20241031151000.svsa7d2ogcdz7hf6@jpoimboe \
    --to=jpoimboe@kernel.org \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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