From: Jeff King <peff@peff.net>
To: Toon Claes <toon@iotcl.com>
Cc: Gusted <gusted@codeberg.org>,
git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>
Subject: Re: git-last-modified(1) slower than git-log(1)?
Date: Fri, 17 Jul 2026 04:09:05 -0400 [thread overview]
Message-ID: <20260717080905.GC1832790@coredump.intra.peff.net> (raw)
In-Reply-To: <87se5jf9f7.fsf@emacs.iotcl.com>
On Thu, Jul 16, 2026 at 01:42:04PM +0200, Toon Claes wrote:
> > - 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.
> > +/*
> > + * 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
next prev parent reply other threads:[~2026-07-17 8:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 18:33 git-last-modified(1) slower than git-log(1)? Gusted
2026-07-16 4:28 ` Jeff King
2026-07-16 11:42 ` Toon Claes
2026-07-17 8:09 ` Jeff King [this message]
2026-07-16 9:26 ` Toon Claes
2026-07-17 0:19 ` Gusted
2026-07-17 8:02 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260717080905.GC1832790@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gusted@codeberg.org \
--cc=me@ttaylorr.com \
--cc=toon@iotcl.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox