Re: [PATCH 7/9] commit-graph: drop count_distinct_commits() function
- From
Jeff King <peff@peff.net>
- Date
- Dec 7, 2020, 19:01 UTC
- Message-ID
- <X8578ZoJKcGOC5Po@coredump.intra.peff.net>
- In-Reply-To
- <87sg8lxa1b.fsf@evledraar.gmail.com>
On Sat, Dec 05, 2020 at 03:26:56AM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 16 quoted lines
> On Fri, Dec 04 2020, Jeff King wrote: > > > When writing a commit graph, we collect a list of object ids in an > > array, which we'll eventually copy into an array of "struct commit" > > pointers. Before we do that, though, we count the number of distinct > > commit entries. There's a subtle bug in this step, though. > > [...] > > - display_progress(ctx->progress, 0); /* TODO: Measure QSORT() progress */ > > - QSORT(ctx->oids.list, ctx->oids.nr, oid_compare); > > [...] > > + QSORT(ctx->oids.list, ctx->oids.nr, oid_compare); > > One thing your commit messag doesn't note is the removal of this > TODO. Theoretically we still have the issue I noted in 890226ccb57 > (commit-graph write: add itermediate progress, 2019-01-19), in practice > I think it's fine to just forever remove this TODO.
Yeah, I don't think we can really put progress bars on everything. If you have a dataset so large that sorting the commits by oid takes a long time, then I think you probably just need to accept that there are going to be some small pauses while Git works.
-Peff