Re: [PATCH v4 0/3] fetch --prune performance problem
- From
Jeff King <peff@peff.net>
- Date
- Jul 8, 2025, 01:36 UTC
- Message-ID
- <20250708013612.GB549007@coredump.intra.peff.net>
- In-Reply-To
- <xmqqtt3n1v27.fsf@gitster.g>
On Mon, Jul 07, 2025 at 03:43:12PM -0700, Junio C Hamano wrote:
Show 20 quoted lines
> Phil Hord <phil.hord@gmail.com> writes: > > > From: Phil Hord <phil.hord@gmail.com> > > > > `git fetch --prune` runs in O(N^2) time normally. This happens because the code > > iterates over each ref to be pruned to display its status. In a repo with > > 174,000 refs, where I was pruning 15,000 refs, the current code made 2.6 billion > > calls to strcmp and consumed 470 seconds of CPU. After this change, the same > > operation completes in under 1 second. > > ... > > V3 forgot to include the first commit in the series (I forgot it grew). > > So here's V4. > > > > Phil Hord (3): > > fetch-prune: optimize dangling-ref reporting > > refs: remove old refs_warn_dangling_symref > > clean up interface for refs_warn_dangling_symrefs > > It seems that the thread has gone quiet. What's the status of this > topic?
v4 looks fine to me. I raised a few questions about the translation strings, but I don't know if they're meaningful or not.
-Peff