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

Re: [RFC PATCH v2] fetch-pack: log(n)-transmission find_common()

From
Nicolas Pitre <nico@cam.org>
Date
Oct 24, 2008, 15:49 UTC
Message-ID
<alpine.LFD.2.00.0810241144260.3061@xanadu.home>
In-Reply-To
<1224790716-20551-1-git-send-email-trast@student.ethz.ch>
On Thu, 23 Oct 2008, Thomas Rast wrote:
Show 24 quoted lines
> Replaces the existing simple history search with a more sophisticated
> algorithm:
> 
> 1) Walk history with exponentially increasing stride lengths; i.e.,
>    send the 1st commit, then the 2nd after that, then the 4th after
>    that, and so on.
> 
> 2) Bisect the resulting intervals.
> 
> Combined with tracking the "outstanding haves" so that we can detect
> which sha1s were never ACKed by upload-pack (and hence not common),
> this gives O(log(n)) required "have" lines.
> 
> Unfortunately this cannot work if the server sends fake ACKs, so we
> introduce a capability 'exp-stride' which instructs upload-pack to
> disable ok_to_give_up().  (Which incidentally saves the server a lot
> of work.)
> 
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> 
> ---
> 
> This is a simple resend of v2, in the hope of attracting some
> discussion or at least encouraging words this time around.

OK, I gave this a quick try, and fetch operations appear to make their mind about what to do quicker. Some fetch requests which used to take up to 5 seconds are somewhat faster. I have no formal measurements though.

Nicolas
Previous: Thomas RastNext: Nanako Shiraishi
Message 5 of 13 in “[RFC] log(n)-transmissions common commit handshake”
  1. Thomas RastSep 17, 2008
  2. fetch-pack: log(n)-transmission find_common()Thomas Rast, Sep 17, 2008
  3. fetch-pack: log(n)-transmission find_common()Thomas Rast, Sep 24, 2008
  4. fetch-pack: log(n)-transmission find_common()Thomas Rast, Oct 23, 2008
  5. Nicolas PitreOct 24, 2008
  6. Nanako ShiraishiOct 27, 2008
  7. Junio C HamanoOct 28, 2008
  8. Nicolas PitreOct 28, 2008
  9. Thomas RastOct 28, 2008
  10. 0/2 fetch-pack: log(n)-transmission find_common()Thomas Rast, Dec 6, 2008
  11. 1/2 fetch-pack: rearrange main loopThomas Rast, Dec 6, 2008
  12. 2/2 fetch-pack: log(n)-transmission find_common()Thomas Rast, Dec 6, 2008
  13. Thomas RastSep 18, 2008

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.