git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
	Jakub Narebski <jnareb@gmail.com>,
	sparse@infidigm.net, git@vger.kernel.org
Subject: Re: [Patch] Prevent cloning over http from spewing
Date: Thu, 4 Jun 2009 20:45:28 +0800	[thread overview]
Message-ID: <be6fef0d0906040545j7bd754e0j2c60af833e2ac4a4@mail.gmail.com> (raw)
In-Reply-To: <20090603191555.GL3355@spearce.org>

Hi,

On Thu, Jun 4, 2009 at 3:15 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> No, you are right Peff, you can't give a "percent complete" because
> you don't know how much you need to fetch.
>
> What we could do is try to organize the fetch queue by object type,
> get all commits, then all trees, then blobs.  The blobs are the
> bulk of the data, and by the time we hit them, we should be able
> to give some estimate on progress because we have all of the ones
> we need to fetch in our fetch queue.  But its only a "object count"
> sort of thing, not a byte count.
>
> When fetching a .idx or a .pack though, we should be able to show
> progress... assuming the server sent us a Content-Length header.
> If not, in the case of a pack, we could still show receive speed
> like index-pack does.

I have a branch 'http-progress-indicators' at my repo
git://github.com/rctay/git.git. It contains a patch on walker.c that
updates the object total as the fetch goes along. The progress
indicator says "Processing targets:..." for lack of a better name; I'm
all for suggestions.

The branch also patches that display progress meters for the
downloading of .idx and .pack files. I also added a progress indicator
for verifying pack files in pack-check.c, because I noticed some
significant time was spent doing that without informing the user about
what was going on, but I'm not really sure if everyone else would
accept it.

So far, I've used git built using that branch to fetch the git repo,
and I also attempted the linux 2.6 kernel repo. Counting the objects
fetched was accurate in both cases (ie. matching counts of objects
fetched and objects to-be-fetched).

I plan to clean up the patches and send it in when the http
refactoring patches are finalized.

> Jeff King <peff@peff.net> wrote:
>>   1. summarize what we have fetched (N packs, N loose objects)
>>   2. show what we are currently fetching (object or pack)
>>   3. show the number of bytes retrieved for the current item
>>   4. if the server provides content-length, show the percentage
>>      completed for this object
>>   5. show the current throughput

Points 1. and 5. can probably be combined, because showing info by
type (packs and objects) isn't very easy to do. http-walker.c first
tries to fetch the raw pack; if it can't be found at the url, or at
alternate locations, it then tries to fetching packs. In other words,
it's hard to know in advance if the object is found in unpacked or
packed form.

-- 
Cheers,
Ray Chuan

  parent reply	other threads:[~2009-06-04 12:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 17:42 [Patch] Prevent cloning over http from spewing sparse
2009-06-03 10:21 ` Erik Faye-Lund
2009-06-03 10:39 ` Jakub Narebski
2009-06-03 18:28   ` Junio C Hamano
2009-06-03 19:10     ` Jeff King
2009-06-03 19:15       ` Shawn O. Pearce
2009-06-03 19:24         ` Jeff King
2009-06-03 19:32           ` Shawn O. Pearce
2009-06-03 19:44             ` Jeff King
2009-06-03 19:52               ` Shawn O. Pearce
2009-06-04 12:45         ` Tay Ray Chuan [this message]
2009-06-04 16:01           ` Jeff King
2009-06-07 10:31             ` Tay Ray Chuan
2009-06-07 11:21               ` Tay Ray Chuan
2009-06-08 12:24                 ` Jeff King
2009-06-10 14:03                   ` Tay Ray Chuan
2009-06-10 14:07                     ` Tay Ray Chuan
2009-06-11 11:11                     ` Jeff King
2009-06-22 12:10                       ` Tay Ray Chuan
2009-07-20 15:24                         ` Tay Ray Chuan
2009-06-08 11:54               ` Jeff King
2009-06-07 11:25           ` Tay Ray Chuan
2009-06-05  0:17     ` Jakub Narebski

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=be6fef0d0906040545j7bd754e0j2c60af833e2ac4a4@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=peff@peff.net \
    --cc=sparse@infidigm.net \
    --cc=spearce@spearce.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).