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