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

Re: Performance regression in connectivity check during receive-pack (git 2.54)

From
Jeff King <peff@peff.net>
Date
Jul 23, 2026, 10:39 UTC
Message-ID
<20260723103911.GA604358@coredump.intra.peff.net>
In-Reply-To
<xmqqtsps76f1.fsf@gitster.g>
On Tue, Jul 21, 2026 at 07:40:02AM -0700, Junio C Hamano wrote:
Show 25 quoted lines
> Stepping back a bit, the 'rev-list' command used for the
> connectivity check is curious in multiple aspects.
> 
>  * On the surface, it looks as if the caller wants an enumeration of
>    all objects that appear in the range.  However, the caller is not
>    interested in the actual list of objects.  Instead, they are
>    interested only in a single bit: whether the traversal succeeds
>    or dies due to a missing object.  This is because the traversal
>    determines whether we need to fetch, or whether we are already up
>    to date, to decide whether the proposed 'fetch' is a no-op.  The
>    positive ends of the traversal represent what we are about to
>    fetch; if we already have all the objects needed to reach those
>    tips in our repository, we can do without actually downloading
>    anything [*].
> 
>  * A false positive answer to the question "does the traversal die
>    due to a missing object?" does not affect correctness, as this is
>    merely an optimization to save downloads (though a false negative
>    is unacceptable).
> 
> Given this non-standard use of the command, we can pass
> application-specific cues (such as "we are doing this traversal for
> a connectivity check") down to the machinery as a hint to help it
> optimize its operation, and I suspect that such a hint might have
> value.

Yeah, I think there may be some interesting opportunities for optimization in check_connected(). But as you noted, it is sometimes used for fetch asking "do we probably have all of these objects" but also for strict connectivity checks for incoming objects. The quarantine area triggers only for the latter (in this case receive-pack), so it would not really help here.

IOW, I'd consider it a mostly orthogonal possible direction for optimization (but still a potentially interesting one).

-Peff
Previous: Jeff King
Message 13 of 13 in “Performance regression in connectivity check during receive-pack (git 2.54)”
  1. Wolfgang KritzingerJul 21, 2026
  2. Jeff KingJul 21, 2026
  3. Taylor BlauJul 21, 2026
  4. Junio C HamanoJul 21, 2026
  5. Patrick SteinhardtJul 22, 2026
  6. Junio C HamanoJul 22, 2026
  7. Jeff KingJul 23, 2026
  8. Patrick SteinhardtJul 24, 2026
  9. Jeff KingJul 26, 2026
  10. Justin ToblerJul 27, 2026
  11. Patrick SteinhardtAug 4, 2026
  12. Jeff KingJul 23, 2026
  13. Jeff KingJul 23, 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.