Re: [PATCH v3 1/2] commit-graph write: add progress output
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Oct 10, 2018, 22:19 UTC
- Message-ID
- <20181010221951.GG23446@szeder.dev>
- In-Reply-To
- <87pnwhea8y.fsf@evledraar.gmail.com>
On Wed, Oct 10, 2018 at 11:56:45PM +0200, Ævar Arnfjörð Bjarmason wrote:
> On Wed, Oct 10 2018, SZEDER Gábor wrote:
Show 15 quoted lines
> >> for (i = 0; i < oids->nr; i++) {
> >> + display_progress(progress, ++j);
>
> [...]
>
> > This display_progress() call, however, doesn't seem to be necessary.
> > First, it counts all commits for a second time, resulting in the ~2x
> > difference compared to the actual number of commits, and then causing
> > my confusion. Second, all what this loop is doing is setting a flag
> > in commits that were already looked up and parsed in the above loops.
> > IOW this loop is very fast, and the progress indicator jumps from
> > ~780k right to 1.5M, even on my tiny laptop, so it doesn't need a
> > progress indicator at all.
>
> You're right, I tried this patch on top:[...]
Show 5 quoted lines
> And on a large repo with around 3 million commits the 3rd progress bar > doesn't kick in. > > But if I apply this on top: >
[...]
Show 6 quoted lines
> > I.e. start the timer after 1/4 of a second instead of 1 second, I get > that progress bar. > > So I'm inclined to keep it. It just needs to be 4x the size before it's > noticeably hanging for 1 second.
Just to clarify: are you worried about a 1 second hang in an approx. 12 million commit repository? If so, then I'm unconvinced, that's not even a blip on the radar, and the misleading numbers are far worse.
Show 9 quoted lines
> That repo isn't all that big compared to what we've heard about out > there, and inner loops like this have a tendency to accumulate some more > code over time without a re-visit of why we weren't monitoring progress > there. > > But maybe we can fix the message. We say "Annotating commits in commit > grap", not "Counting" or whatever. I was trying to find something that > didn't imply that we were doing this once. One can annotate a thing more > than once, but maybe ther's a better way to explain this...
IMO just remove it.