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

Re: [PATCH 1/2] fetch-pack: Finish negotation if remote replies "ACK %s ready"

From
Jeff King <peff@peff.net>
Date
Mar 17, 2011, 07:15 UTC
Message-ID
<20110317071512.GF11931@sigill.intra.peff.net>
In-Reply-To
<1300146519-26508-1-git-send-email-spearce@spearce.org>
On Mon, Mar 14, 2011 at 04:48:38PM -0700, Shawn O. Pearce wrote:
Show 12 quoted lines
> Upon receiving "ACK %s ready" there is no point in looking at
> the remaining commits inside of rev_list.  Sending additional
> "have %s" lines to the remote will not construct a smaller pack.
> It is unlikely a commit older than the current cut point will have
> a better delta base than the cut point itself has.
> [...]
> Assuming the client is only following the remote (and does not make
> its own local commits), the client needs 11 rounds to spin through
> the entire list of tags (32 commits per round, ceil(339/32) == 11).
> Unfortunately the server knows on the first "have %s" line that
> it can produce a good pack, and does not need to see the remaining
> 320 tags in the other 10 rounds.

Does this optimization help in that case? From looking at the code, it seems that we offer "ACK %s ready" only in the case that the client has something we do not. I.e., they _are_ building local commits on top.

> Over smart HTTP, the client must do an additional 10 HTTP POST
> requests, each of which incurs round-trip latency, and must upload
> the entire state vector of all known common objects.  On the final
> POST request, this is 16 KiB worth of data.

This optimization aside, I wonder if it is worth bumping up the number of haves we send in a chunk from 32 to something higher.

-Peff
Previous: Shawn O. PearceNext: Jeff King
Message 3 of 5 in “fetch-pack: Finish negotation if remote replies "ACK %s ready"”
  1. 1/2 fetch-pack: Finish negotation if remote replies "ACK %s ready"Shawn O. Pearce, Mar 14, 2011
  2. 2/2 upload-pack: More aggressively send 'ACK %s ready'Shawn O. Pearce, Mar 14, 2011
  3. Jeff KingMar 17, 2011
  4. Jeff KingMar 17, 2011
  5. Shawn PearceMar 17, 2011

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.