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

Re: "git reflog expire --all" very slow

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 31, 2009, 05:09 UTC
Message-ID
<alpine.LFD.2.00.0903302154000.4093@localhost.localdomain>
In-Reply-To
<7vk5668g55.fsf@gitster.siamese.dyndns.org>
On Mon, 30 Mar 2009, Junio C Hamano wrote:
Show 5 quoted lines
> 
> Most of your reflog entries are expected to be reachable from the tip, so
> one optimization would be to mark all commits reachable from the tip
> upfront, and omit the in_merge_bases() computation for the ones that are
> already marked.  Perhaps something like this...
This if anything makes things just go slower.

Not much, but some. It went from 36.566s to 38.070s. That may be in the noise, I've not done any sensitivity analysis.

I thought you perhaps had a missing "parse_commit()" making the reachability thing not work (look_up_gently parses the object, but if it's a tag deref_tag() will dereference it until it hits a commit, but never parse the commit). But that wasn't it.

			Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 13 in “"git reflog expire --all" very slow”
  1. Linus TorvaldsMar 31, 2009
  2. Junio C HamanoMar 31, 2009
  3. Linus TorvaldsMar 31, 2009
  4. Junio C HamanoMar 31, 2009
  5. Linus TorvaldsMar 31, 2009
  6. Junio C HamanoMar 31, 2009
  7. Junio C HamanoMar 31, 2009
  8. Linus TorvaldsMar 31, 2009
  9. Linus TorvaldsMar 31, 2009
  10. Linus TorvaldsMar 31, 2009
  11. Junio C HamanoApr 2, 2009
  12. Linus TorvaldsApr 2, 2009
  13. Junio C HamanoMar 31, 2009

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.