Re: [PATCH 6/8] implement metadata cache subsystem

2012-08-06 Thread Jeff King
On Sat, Aug 04, 2012 at 01:11:46PM -0400, Jeff King wrote: > +#define IMPLEMENT_CACHE(name, maptype, ktype, vtype) \ > +static struct map_persist_sha1pair_uint32 name##_map; \ A minor fixup, but this should obviously be "map_persist_##maptype". It doesn't matter for this series (since we only ins

Re: [PATCH 6/8] implement metadata cache subsystem

2012-08-06 Thread Jeff King
On Sat, Aug 04, 2012 at 03:49:12PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > There are some calculations that git makes repeatedly, even > > though the results are invariant for a certain input (e.g., > > the patch-id of a certain commit). We can make a space/time > > tradeoff by ca

Re: [PATCH 6/8] implement metadata cache subsystem

2012-08-04 Thread Junio C Hamano
Jeff King writes: > There are some calculations that git makes repeatedly, even > though the results are invariant for a certain input (e.g., > the patch-id of a certain commit). We can make a space/time > tradeoff by caching these on disk between runs. > > Even though these may be immutable for

[PATCH 6/8] implement metadata cache subsystem

2012-08-04 Thread Jeff King
There are some calculations that git makes repeatedly, even though the results are invariant for a certain input (e.g., the patch-id of a certain commit). We can make a space/time tradeoff by caching these on disk between runs. Even though these may be immutable for a certain commit, we don't want