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 l

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 wrote: > On Wed, Oct 30, 2013 at 9:10 AM, Jeff King 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 objec

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 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 from a fi

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 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 how wel

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 re

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 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 strai

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

2013-10-24 Thread Jeff King
From: Vicent Marti A bitmap index is a `.bitmap` file that can be found inside `$GIT_DIR/objects/pack/`, next to its corresponding packfile, and contains precalculated reachability information for selected commits. The full specification of the format for these bitmap indexes can be found in `Doc