Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Patrick Ohly <patrick.ohly@intel.com>
Subject: Re: [PATCH 2/2] odb/source-loose: fix existence checks for newly written objects
Date: Mon, 16 Nov 2026 09:16:27 +0100	[thread overview]
Message-ID: <avq726hUdY38fJS-@pks.im> (raw)
In-Reply-To: <20261109185003.GA1322417@coredump.intra.peff.net>

On Mon, Nov 09, 2026 at 01:50:03PM -0500, Jeff King wrote:
> On Mon, Nov 09, 2026 at 02:44:46PM +0100, Patrick Steinhardt wrote:
> 
> > >  	/*
> > >  	 * This is meant for bulk prefetching of missing blobs in a partial
> > >  	 * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK.
> > > +	 *
> > > +	 * NEEDSWORK: rethink if QUICK is desired in this context.
> > > +	 * cf. <au23Hvzp09yrym9s@pks.im>
> > >  	 */
> > >  	OBJECT_INFO_FOR_PREFETCH = (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK),
> > >  };
> > 
> > Yeah, that'd probably be sensible. But I wonder whether that comment
> > should rather be applied to `OBJECT_INFO_QUICK` itself, as I think it's
> > way too much of a foot gun and I'm not sure whether it's ever really
> > sensible to use. But I'm fine with either variant.
> 
> If you are going to get rid of QUICK (which is only implied here, but
> which you said more explicitly up-thread), I think you would need to
> check all of the users to see whether original performance problems it
> was addressing still exist.

Oh, definitely, I wasn't proposing to rip this out without having a
deeper look :)

> For instance, 5827a03545 (fetch: use "quick" has_sha1_file for tag
> following, 2016-10-13) reports a 99% speedup. We have made the pack
> re-scan much faster over the last decade or so, so the results now might
> not be so dramatic.
> 
> We should be able to check at least that spot easily. The original
> results were reported on p5550, so here's what I get after un-quicking
> it (patch is below for reference):
> 
>   Test            HEAD^             HEAD
>   ----------------------------------------------------------
>   5550.4: fetch   0.10(0.07+0.03)   1.42(0.98+0.44) +1320.0%
> 
> Not quite as dramatic as the original, but it still makes quite a
> measurable difference. I will note that p5550 is intentionally
> pathological, though, so real world performance might not be as extreme.

Yeah, it's certainly an indicator though that we cannot just drop this
as-is.

But next to the performance question, I think the more interesting one
is whether this particular instance actually performs correct in all
cases with conncurrent repository maintenance and with promisor remotes.
Because if the answer is "no" then that makes the performance win rather
moot.

Anyway, I don't plan to have a deeper look at this for now, but it might
be something to revisit in the not-too-distant future.

Patrick

  reply	other threads:[~2026-11-16  8:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 12:16 [PATCH 0/2] odb/source-loose: fix failing existence checks caused by stale cache Patrick Steinhardt
2026-11-04 12:16 ` [PATCH 1/2] odb/source-loose: extract logic to retrieve subdirectory bitmap Patrick Steinhardt
2026-11-13  9:39   ` Toon Claes
2026-11-04 12:16 ` [PATCH 2/2] odb/source-loose: fix existence checks for newly written objects Patrick Steinhardt
2026-11-04 17:47   ` Junio C Hamano
2026-11-05 19:43   ` Jeff King
2026-11-06 11:16     ` Patrick Steinhardt
2026-11-06 16:02       ` Junio C Hamano
2026-11-09 13:44         ` Patrick Steinhardt
2026-11-09 18:50           ` Jeff King
2026-11-16  8:16             ` Patrick Steinhardt [this message]
2026-11-04 12:57 ` [PATCH 0/2] odb/source-loose: fix failing existence checks caused by stale cache Kristofer Karlsson
2026-11-04 16:27   ` Derrick Stolee
2026-11-05  0:09   ` Junio C Hamano

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=avq726hUdY38fJS-@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=patrick.ohly@intel.com \
    --cc=peff@peff.net \
    /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