Subject: Re: What's cooking in git.git (topics)

From: "Shawn O. Pearce" <[email-masked]>
Date: Fri, 12 Jan 2007 01:26:44 -0500

Junio C Hamano <[email-masked]> wrote:
> With the tip of linux-2.6 repository, v1.4.4 series takes 0.03s
> while v1.5.0-rc1 takes about 3.6s.  That is 100x fold, not just
> 4x.
> 
> It turns out that to describe 0404f87f (tip of linux-2.6) the
> new one picks up 61 tags in the posible-tag loop.
> 
> Since this loop uses the usual date-order, we can limit the
> number of candidate tags without losing too much precision.
> When limiting the candidates to only 6 (attached patch), the
> time drops to 0.25s.

OK.  Apply your patch to master.  3.6s is insane, even for
git-describe. I think your guess of 6 is reasonable, but I'd
obviously like to remove the need for it entirely.

I think I have a sketch in my head for an algorithm that can
compute the revision counts while in the possible-tag loop, which
would completely remove the huge cost of the per-tag revision
list later on.  I can't work on it right now (need to get other
stuff done before 1 pm Friday) but I will try to code and test it
tomorrow afternoon.  If I'm right I'll send a patch.

-- 
Shawn.