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

2013-10-30 Thread Jeff King
On Fri, Oct 25, 2013 at 01:55:13PM +, Shawn O. Pearce wrote: 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

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

2013-10-30 Thread Shawn Pearce
On Wed, Oct 30, 2013 at 8:10 AM, Jeff King p...@peff.net wrote: On Fri, Oct 25, 2013 at 01:55:13PM +, Shawn O. Pearce wrote: 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

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

2013-10-30 Thread Vicent Marti
On Wed, Oct 30, 2013 at 9:10 AM, Jeff King p...@peff.net wrote: In fact, I'm not quite sure that even a partial reuse up to an offset is 100% safe. In a newly packed git repo it is, because we always put bases before deltas (and OFS_DELTA objects need this). But if you had a bitmap generated

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

2013-10-30 Thread Shawn Pearce
On Wed, Oct 30, 2013 at 3:47 PM, Vicent Marti vic...@github.com wrote: On Wed, Oct 30, 2013 at 9:10 AM, Jeff King p...@peff.net wrote: In fact, I'm not quite sure that even a partial reuse up to an offset is 100% safe. In a newly packed git repo it is, because we always put bases before

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

2013-10-30 Thread Jeff King
On Wed, Oct 30, 2013 at 04:47:57PM +0100, Vicent Martí wrote: Yes, our pack writing and bitmap code takes enough precautions to arrange the objects in the packfile in a way that can be partially reused, so for any given bitmap file written from Git, I'd say we're safe to always reuse the

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

2013-10-25 Thread Shawn Pearce
On Thu, Oct 24, 2013 at 6:03 PM, Jeff King p...@peff.net 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