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

Re: [PATCH] [RFC] Making use of bitmaps for thin objects

From
Jeff King <peff@peff.net>
Date
Jan 6, 2014, 19:41 UTC
Message-ID
<20140106194152.GB27062@sigill.intra.peff.net>
In-Reply-To
<xmqq38l1kqw2.fsf@gitster.dls.corp.google.com>
On Mon, Jan 06, 2014 at 08:37:49AM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > We could probably teach index-pack an "--assume-refs-are-thin"
> > option to optimize for this case, and have fetch-pack/receive-pack pass
> > it whenever they know that delta-base-offset was negotiated.
> 
> I thought the existing negotiation merely means "I understand offset
> encoded bases, so you are allowed to use that encoding", not "I will
> not accept encoding other than the offset format, so you must use
> that encoding for everything".

You are right about what it means. But this is an optimization, not a correctness thing. So if we assume that senders who are allowed to send offsets will generally do so, it might be a reasonable optimization to guess that ref-delta objects will need thin completion. If we are wrong, the worst case is that we add an extra local object to the end of the pack. So as long as we are right most of the time, it may still be a win.

Of course, it may also be possible to simply multi-thread the thin-completion portion of index-pack. That would be even better, though I am not sure how it would work. The resolution of an object in one thread can always become the input for another thread. But maybe we could have each thread come up with a proposed set of objects to add to the pack, and then drop duplicates or something. I haven't looked closely.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 5 of 11 in “[RFC] Making use of bitmaps for thin objects”
  1. [RFC] Making use of bitmaps for thin objectsBen Maurer, Dec 22, 2013
  2. Ben MaurerDec 22, 2013
  3. Jeff KingJan 6, 2014
  4. Junio C HamanoJan 6, 2014
  5. Jeff KingJan 6, 2014
  6. Jeff KingJan 6, 2014
  7. Jeff KingJan 6, 2014
  8. Ben MaurerJan 6, 2014
  9. Jeff KingJan 6, 2014
  10. Ben MaurerJan 6, 2014
  11. Jeff KingJan 7, 2014

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.