Re: push race
- From
Jeff King <peff@peff.net>
- Date
- Oct 16, 2012, 17:02 UTC
- Message-ID
- <20121016170232.GA27243@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8D14sv5=+5zfiwgYCb7OoEqvQoVQ0ObAeWtUUSjRAgBeQ@mail.gmail.com>
On Tue, Oct 16, 2012 at 05:45:12PM +0700, Nguyen Thai Ngoc Duy wrote:
Show 12 quoted lines
> On Tue, Oct 16, 2012 at 12:37 PM, Jeff King <peff@peff.net> wrote: > > I suspect a site that is heavy on alternates is invoking the index-pack > > code path more frequently than necessary (e.g., history gets pushed to > > one forked repo, then when it goes to the next one, we may not share the > > ref that tells the client we already have the object and receive it a > > second time). > > I suppose we could do the way unpack-objects does: prefer present > objects and drop the new identical ones, no memcmp. Objects that are > not bases, or are ref-delta bases, can be safely dropped. ofs-delta > bases may lead to rewriting the pack. Do-able but not sure it's worth > the effort.
Yeah, I think that complexity is why we don't do it currently. We are pretty alternates-heavy at GitHub, and we have not noticed a performance impact. So I think it is probably not worth worrying about.
-Peff