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

Re: [PATCH] fetch-pack: speed up loading of refs via commit graph

From
Jeff King <peff@peff.net>
Date
Aug 5, 2021, 20:29 UTC
Message-ID
<YQxKEyHXm2W2Y3M5@coredump.intra.peff.net>
In-Reply-To
<87y29fzp5f.fsf@evledraar.gmail.com>
On Thu, Aug 05, 2021 at 09:05:59PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 17 quoted lines
> 
> On Wed, Aug 04 2021, Jeff King wrote:
> 
> > [...]
> > If we don't go that route, there's another possible speedup: after
> > parsing a tag, the type of tag->tagged (if it is not NULL) will be known
> > from the tag's contents, and we can avoid the oid_object_info_extended()
> > type lookup. It might need some extra surgery to convince the tag-parse
> > not to fetch promisor objects, though.
> >
> > I'm not sure it would make that big a difference, though. If we save one
> > type-lookup per parsed tag, then the tag parsing is likely to dwarf it.
> 
> Except that the tag type can be a lie, as our tests and some recent
> object/fsck serieses (not yet integrated) from me show. It can be relied
> upon for >99.99% of cases, but code like that needs to make sure it's
> not segfaulting or whatever if that relationship doesn't hold.

Yes, but we'd discover that when we called repo_parse_commit(), and Patrick's patch already handles failure there.

-Peff
Previous: Ævar Arnfjörð Bjarmason
Message 12 of 12 in “fetch-pack: speed up loading of refs via commit graph”
  1. fetch-pack: speed up loading of refs via commit graphPatrick Steinhardt, Aug 4, 2021
  2. Derrick StoleeAug 4, 2021
  3. Junio C HamanoAug 4, 2021
  4. Jeff KingAug 4, 2021
  5. Junio C HamanoAug 4, 2021
  6. Patrick SteinhardtAug 5, 2021
  7. Patrick SteinhardtAug 5, 2021
  8. Junio C HamanoAug 5, 2021
  9. Jeff KingAug 5, 2021
  10. Jeff KingAug 5, 2021
  11. Ævar Arnfjörð BjarmasonAug 5, 2021
  12. Jeff KingAug 5, 2021

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.