git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 12, 2007, 06:26 UTC
Message-ID
<20070112062644.GC24195@spearce.org>
In-Reply-To
<7vr6u0wz2s.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 11 quoted lines
> 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.
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 18 in “What's cooking in git.git (topics)”
  1. Junio C HamanoJan 10, 2007
  2. Junio C HamanoJan 11, 2007
  3. Nicolas PitreJan 11, 2007
  4. Shawn O. PearceJan 11, 2007
  5. Andreas EricssonJan 11, 2007
  6. Nicolas PitreJan 11, 2007
  7. Andreas EricssonJan 11, 2007
  8. Shawn O. PearceJan 12, 2007
  9. Junio C HamanoJan 12, 2007
  10. Shawn O. PearceJan 12, 2007
  11. Junio C HamanoJan 11, 2007
  12. Shawn O. PearceJan 11, 2007
  13. Junio C HamanoJan 11, 2007
  14. Shawn O. PearceJan 12, 2007
  15. Jakub NarebskiJan 12, 2007
  16. Johannes SchindelinJan 11, 2007
  17. Junio C HamanoJan 11, 2007
  18. Johannes SchindelinJan 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.