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

Re: [PATCH 6/6] pack-objects: reuse on-disk deltas for thin "have" objects

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 20, 2018, 21:03 UTC
Message-ID
<xmqqa7pgbvie.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180817210604.GF20088@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> And that's exactly what this patch does: when we're
> considering whether to reuse an on-disk delta, if bitmaps
> tell us the other side has the object (and we're making a
> thin-pack), then we reuse it.

That's really the natural extension and logical consequence of the "reuse existing deltas" mechanism from Feb 2006 ;-)

Show 11 quoted lines
> So taking all of those options into account, what I ended up
> with is a separate list of "external bases" that are not
> part of the main packing list. Each delta entry that points
> to an external base has a single-bit flag to do so; we have a
> little breathing room in the bitfield section of
> object_entry.
>
> This lets us limit the change primarily to the oe_delta()
> and oe_set_delta_ext() functions. And as a bonus, most of
> the rest of the code does not consider these dummy entries
> at all, saving both runtime CPU and code complexity.
Tricky ;-)

I wonder if we can move the preferred base objects that we are not going to send also off of the "main packing list" to this new mechanism?

> +static struct bitmap_index *bitmap_git;
> ...
> +static int thin = 0;
Please trust what BSS will do to your static vars.
Previous: Jeff KingNext: Jeff King
Message 12 of 17 in “reuse on-disk deltas for fetches with bitmaps”
  1. 0/6 reuse on-disk deltas for fetches with bitmapsJeff King, Aug 17, 2018
  2. 1/6 t/perf: factor boilerplate out of test_perfJeff King, Aug 17, 2018
  3. 2/6 t/perf: factor out percent calculationsJeff King, Aug 17, 2018
  4. 3/6 t/perf: add infrastructure for measuring sizesJeff King, Aug 17, 2018
  5. 4/6 t/perf: add perf tests for fetches from a bitmapped serverJeff King, Aug 17, 2018
  6. 5/6 pack-bitmap: save "have" bitmap from walkJeff King, Aug 17, 2018
  7. Stefan BellerAug 17, 2018
  8. Jeff KingAug 17, 2018
  9. 6/6 pack-objects: reuse on-disk deltas for thin "have" objectsJeff King, Aug 17, 2018
  10. Stefan BellerAug 17, 2018
  11. Jeff KingAug 17, 2018
  12. Junio C HamanoAug 20, 2018
  13. Jeff KingAug 20, 2018
  14. 0/6 reuse on-disk deltas for fetches with bitmapsJeff King, Aug 21, 2018
  15. Jeff KingAug 21, 2018
  16. Junio C HamanoAug 21, 2018
  17. Jeff KingAug 21, 2018

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.