git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
	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 12:01:52 -0400	[thread overview]
Message-ID: <20090604160152.GA13984@sigill.intra.peff.net> (raw)
In-Reply-To: <be6fef0d0906040545j7bd754e0j2c60af833e2ac4a4@mail.gmail.com>

On Thu, Jun 04, 2009 at 08:45:28PM +0800, Tay Ray Chuan wrote:

> 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.

Thanks, I took a look at starting on a progress meter yesterday, but I
do think it makes sense to integrate with the work you are doing.

I tried your http-progress-indicators branch. A few comments:

  1. You still end up with a lot of lines of output. Some of those are
     "Getting pack $x" which we can probably get rid of in non-verbose
     mode. But we still get a different progress indicator line for each
     fetched item, which can add up to quite a lot. I was thinking of
     something like

        Fetching %s (got %d packs, %d loose): (%d/%d)

     with the substitutions:

       %s = "pack", "index", or "loose object"
       %d packs, %d loose = a running count of how much we've gotten
       %d/%d = current and total byte counts for what we are getting now

     and then you could keep everything on a single line. I don't think
     is possible with the current progress code (it doesn't let you
     restart the counter), but it should be easy with some tweaking.

  2. The current progress code can also do throughput display, which
     would be nice (see display_throughput in progress.[ch]).

  3. Your implementation calls your get_http_file_size, which does a
     separate HEAD request to get the content-length. Instead, do
     a "curl_easy_setopt(slot->curl, CURLOPT_PROGRESSFUNCTION, ...)"
     to set up a progress callback. Curl will call it with the total
     number of bytes (from the content-length header of the actual GET
     request) and the number of bytes currently downloaded.

-Peff

  reply	other threads:[~2009-06-04 16:03 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
2009-06-04 16:01           ` Jeff King [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090604160152.GA13984@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=rctay89@gmail.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).