Thread (73 messages) flat view 73 messages, 5 authors, 2016-06-15

Re: [PATCH 10/19] pack-bitmap: add support for bitmap indexes

From: Shawn Pearce <hidden>
Date: 2016-06-15 22:59:05

On Thu, Oct 24, 2013 at 6:03 PM, Jeff King [off-list ref] wrote:
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.
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help