Re: thin packs ending up fat
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 13, 2012, 00:14 UTC
- Message-ID
- <7vboq81msn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120112223234.GA4949@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 17 quoted lines
> Hmm. It turns out this is really easy, because we have already marked > such objects as preferred bases. > > So with this patch: > > diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c > index 96c1680..d05e228 100644 > --- a/builtin/pack-objects.c > +++ b/builtin/pack-objects.c > @@ -1439,6 +1439,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, > */ > if (reuse_delta && trg_entry->in_pack && > trg_entry->in_pack == src_entry->in_pack && > + !src_entry->preferred_base && > trg_entry->in_pack_type != OBJ_REF_DELTA && > trg_entry->in_pack_type != OBJ_OFS_DELTA) > return 0;
Yeah, I was wondering why this one-liner was not in the original message ;-)
Show 12 quoted lines
> here are the numbers I get: > > dataset > | fetches | tags > --------------------------------- > before | 53358 | 2750977 > size after | 32398 | 2668479 > change | -39% | -3% > --------------------------------- > before | 0.18 | 1.12 > CPU after | 0.18 | 1.15 > change | +0% | +3%
Looks good.