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

Re: [PATCH 1/2] upload-pack: avoid parsing objects during ref advertisement

From
Shawn Pearce <spearce@spearce.org>
Date
Jan 29, 2013, 08:10 UTC
Message-ID
<CAJo=hJubUF2mmkzXU77kQ5uj1cbBZrnLcw2u736wMqxhs39jdQ@mail.gmail.com>
In-Reply-To
<20120106191740.GA12903@sigill.intra.peff.net>
On Fri, Jan 6, 2012 at 11:17 AM, Jeff King <peff@peff.net> wrote:
> When we advertise a ref, the first thing we do is parse the
> pointed-to object. This gives us two things:
...
Show 6 quoted lines
> The downside is that we are no longer verifying objects that
> we advertise by fully parsing them (however, we do still
> know we actually have them, because sha1_object_info must
> find them to get the type). While we might fail to detect a
> corrupt object here, if the client actually fetches the
> object, we will parse (and verify) it then.

As you explain, its not necessary to verify during the advertisement phase. Its fine to delay verification to when a client actually "wants" the object.

Show 5 quoted lines
> On a repository with 120K refs, the advertisement portion of
> upload-pack goes from ~3.4s to 3.2s (the failure to speed up
> more is largely due to the fact that most of these refs are
> tags, which need dereferenced to find the tag destination
> anyway).

Why aren't we using the peeled information from the packed-refs file? JGit does this and it saves a lot of time on advertisements from a well packed repository.

Previous: Junio C HamanoNext: Jeff King
Message 15 of 17 in “parse_object: try internal cache before reading object db”
  1. parse_object: try internal cache before reading object dbJeff King, Jan 5, 2012
  2. Junio C HamanoJan 5, 2012
  3. Jeff KingJan 5, 2012
  4. Junio C HamanoJan 5, 2012
  5. Jeff KingJan 5, 2012
  6. Jeff KingJan 6, 2012
  7. Junio C HamanoJan 6, 2012
  8. Jeff KingJan 6, 2012
  9. Junio C HamanoJan 6, 2012
  10. Jeff KingJan 6, 2012
  11. 1/2 upload-pack: avoid parsing objects during ref advertisementJeff King, Jan 6, 2012
  12. Junio C HamanoJan 18, 2013
  13. Jeff KingJan 24, 2013
  14. Junio C HamanoJan 24, 2013
  15. Shawn PearceJan 29, 2013
  16. Jeff KingJan 29, 2013
  17. 2/2 upload-pack: avoid parsing tag destinationsJeff King, Jan 6, 2012

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.