Re: [PATCH 10/19] pack-bitmap: add support for bitmap indexes
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Oct 25, 2013, 13:55 UTC
- Message-ID
- <CAJo=hJvw-UNWVDADcGzA1P3GGOKJGh8h4LrETPYnjBNYmfkxjQ@mail.gmail.com>
- In-Reply-To
- <20131024180357.GJ24180@sigill.intra.peff.net>
On Thu, Oct 24, 2013 at 6:03 PM, Jeff King <peff@peff.net> wrote:
Show 6 quoted lines
> If `prepare_bitmap_walk` runs successfully, the resulting bitmap is > stored and the equivalent of a `traverse_commit_list` call can be > performed by using `traverse_bitmap_commit_list`; the bitmap version > of this call yields the objects straight from the packfile index > (without having to look them up or parse them) and hence is several > orders of magnitude faster.
This is interesting, we didn't attempt it in JGit, but I can see how it could be very useful.
Show 7 quoted lines
> As an extra optimization, when `prepare_bitmap_walk` succeeds, the > `reuse_partial_packfile_from_bitmap` call can be attempted: it will find > the amount of objects at the beginning of the on-disk packfile that can > be reused as-is, and return an offset into the packfile. The source > packfile can then be loaded and the bytes up to `offset` can be written > directly to the result without having to consider the entires inside the > packfile individually.
Yay! This is similar to the optimization we use in JGit to send the entire pack, but the part about sending a leading prefix is new. Do you have any data showing how well this works in practice for cases where offset is before than length-20?