Re: [PATCH] git exproll: steps to tackle gc aggression
- From
Jeff King <peff@peff.net>
- Date
- Aug 9, 2013, 11:00 UTC
- Message-ID
- <20130809110000.GD18878@sigill.intra.peff.net>
- In-Reply-To
- <CALkWK0=nerszb3_YA8P=qXbfAd4Y1rNsHXhfVKzwtj-x80iqkg@mail.gmail.com>
On Fri, Aug 09, 2013 at 01:34:48AM +0530, Ramkumar Ramachandra wrote:
Show 9 quoted lines
> Certainly. A push will never use an existing pack as-is, as it's very > highly unlikely that the server requested exactly what gc --auto > packed for us locally. > > Sure, undeltified objects in the pack are probably better for push > performance, but I'm talking about the majority: deltified objects. > Don't you need to apply the deltas (ie. explode the pack), before you > can recompute the deltas for the information you're sending across for > the push?
It depends on what each side has it, doesn't it? We generally try to reuse on-disk deltas when we can, since they require no computation. If I have object A delta'd against B, and I know that the other side wants A and has B (or I am also sending B), I can simply send what I have on disk. So we do not just blit out the existing pack as-is, but we may reuse portions of it as appropriate.
Of course we may have to reconstruct deltas for trees in order to find the correct set of objects (i.e., the history traversal). But that is a separate phase from generating the pack's object content, and we do not reuse any of the traversal work in later phases.
-Peff