Re: 2.18.0 Regression: packing performance and effectiveness
- From
Jeff King <peff@peff.net>
- Date
- Jul 20, 2018, 05:30 UTC
- Message-ID
- <20180720053031.GA16126@sigill.intra.peff.net>
- In-Reply-To
- <20180720052829.GA3852@sigill.intra.peff.net>
On Fri, Jul 20, 2018 at 01:28:29AM -0400, Jeff King wrote:
Show 9 quoted lines
> @@ -162,8 +166,10 @@ struct object_entry *packlist_alloc(struct packing_data *pdata, > > if (!pdata->in_pack_by_idx) > REALLOC_ARRAY(pdata->in_pack, pdata->nr_alloc); > + pack_delta_lock(pdata); > if (pdata->delta_size) > REALLOC_ARRAY(pdata->delta_size, pdata->nr_alloc); > + pack_delta_unlock(pdata); > }
This made me wonder if in_pack_by_idx needs a similar lock. But actually, I don't think either is necessary. We only allocate new entries during the counting phase, not during the threaded delta search.
So this hunk could be dropped (and the system CPU benefit I saw is just from reduced lock contention).
-Peff