From: "Shawn O. Pearce" <spearce@spearce.org>
To: Nicolas Pitre <nico@cam.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/5] prune-packed: don't call display_progress() for every file
Date: Wed, 31 Oct 2007 22:58:30 -0400 [thread overview]
Message-ID: <20071101025830.GX14735@spearce.org> (raw)
In-Reply-To: <1193770655-20492-2-git-send-email-nico@cam.org>
Nicolas Pitre <nico@cam.org> wrote:
> The progress count is per fanout directory, so it is useless to call
> it for every file as the count doesn't change that often.
If you go back into the history and look at the commit message for
when I introduced this per-object display_progress() call we find
the following:
commit b5d72f0a4cd3cce945ca0d37e4fa0ebbfcdcdb52
Author: Shawn O. Pearce <spearce@spearce.org>
Date: Fri Oct 19 00:08:37 2007 -0400
[...snip...]
We perform the display_progress() call from within the very innermost
loop in case we spend more than 1 second within any single object
directory. This ensures that a progress_update event from the
timer will still trigger in a timely fashion and allow the user to
see the progress meter.
During my testing with a 40,000 loose object case (yea, I fully
unpacked a git.git clone I had laying around) my system stalled
hard in the first object directory. A *lot* longer than 1 second.
So I got no progress meter for a long time, and then a progress
meter appeared on the second directory.
The display_progress() call already does a reasonably cheap
comparsion to see if the timer has tripped or if the percent complete
has changed. So I figured it was more useful to get feedback to
the user that we were working, but were going to take a while,
than it was to optimize a few machine instructions out of that
inner-most per-object loop.
So I'm a little against this patch. But I think I understand why
you think its worth doing. I just consider the progress feedback
more important than the few machine cycles avoiding it saves.
--
Shawn.
next prev parent reply other threads:[~2007-11-01 2:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-30 18:57 [PATCH 0/5] more progress display stuff Nicolas Pitre
2007-10-30 18:57 ` [PATCH 1/5] prune-packed: don't call display_progress() for every file Nicolas Pitre
2007-10-30 18:57 ` [PATCH 2/5] make struct progress an opaque type Nicolas Pitre
2007-10-30 18:57 ` [PATCH 3/5] relax usage of the progress API Nicolas Pitre
2007-10-30 18:57 ` [PATCH 4/5] add throughput to progress display Nicolas Pitre
2007-10-30 18:57 ` [PATCH 5/5] add throughput display to index-pack Nicolas Pitre
2007-10-30 19:41 ` [PATCH 6/5] add some copyright notice to the progress display code Nicolas Pitre
2007-10-30 21:06 ` [PATCH 7/5] add throughput display to git-push Nicolas Pitre
2007-10-31 0:05 ` [PATCH 2/5] make struct progress an opaque type Junio C Hamano
2007-11-01 2:58 ` Shawn O. Pearce [this message]
2007-11-01 12:06 ` [PATCH 1/5] prune-packed: don't call display_progress() for every file Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071101025830.GX14735@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@cam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).