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

Re: git-last-modified(1) slower than git-log(1)?

From
Jeff King <peff@peff.net>
Date
Jul 17, 2026, 08:09 UTC
Message-ID
<20260717080905.GC1832790@coredump.intra.peff.net>
In-Reply-To
<87se5jf9f7.fsf@emacs.iotcl.com>
On Thu, Jul 16, 2026 at 01:42:04PM +0200, Toon Claes wrote:
Show 6 quoted lines
> >   - more timing exploration; e.g., might it make things worse if
> >     doc/langref were touched in 99% of the commits? Probably not, but it
> >     might be nice to check timings against a few repo shapes and request
> >     depths.
> 
> Maybe, I tried a few things.

Yeah, I would be surprised to find a practical case where it makes things slower. Checking one bloom key is cheap-ish, and unless the subtree being queried is touched by almost every commit, it's going to be a net win.

> Personally I'm not too worried any use-case would be at least equally
> fast.
So yeah, that's my gut feeling, too.
Show 6 quoted lines
> > +/*
> > + * revision.c already has this functionality, but it is not public
> > + * and it looks up the filter itself. But probably some refactoring
> > + * could make it available at the right level?
> 
> I assume you're talking about check_maybe_different_in_bloom_filter()?

Yeah, exactly. We already do the first half (getting the commit's filter) ourselves. And then most of the rest is just trace2 accounting, which we don't necessarily need to do. So we're left with just that one bloom over the keyvecs, which is fairly trivial. Mostly it felt weird to be looking at the innards of rev_info, and the logic for what those keyvecs means should remain in revision.c.

> I was working on a fix to simply make it public and call it, but that's
> a very valid point you're making. I'll change my plans.

I was just thinking to split it into two (get the filter, and then check the filter against the rev_info) and make the latter half public.

-Peff
Previous: Toon ClaesNext: Toon Claes
Message 4 of 8 in “git-last-modified(1) slower than git-log(1)?”
  1. GustedJul 14, 2026
  2. Jeff KingJul 16, 2026
  3. Toon ClaesJul 16, 2026
  4. Jeff KingJul 17, 2026
  5. Toon ClaesJul 16, 2026
  6. GustedJul 17, 2026
  7. Jeff KingJul 17, 2026
  8. Toon ClaesJul 17, 2026

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.