git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: git fetch -v not at all verbose?
Date: Wed, 3 Nov 2010 11:52:49 +0200	[thread overview]
Message-ID: <20101103095249.GA9144@redhat.com> (raw)
In-Reply-To: <7v8wbrtkvn.fsf@alter.siamese.dyndns.org>

On Thu, Jan 21, 2010 at 09:42:36AM -0800, Junio C Hamano wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> 
> >> > Are you fetching from a configured remote that has tracking branches,
> >> > or are you fetching through a one-shot URL pasted onto the command
> >> > line?
> >> 
> >> Configured remote.
> >
> > Hmm.  I wonder if we should try to shortcut the commit walking in
> > a case like this and just feed the tracking branches we already have.
> 
> You mean that the main culprit is the presense of thousdands of commits
> that fetcher has obtained through the other remotes (and his own) that the
> uploader makes fetcher walk all the way, in the false hope that there
> might be a commit among them that is closer to the commits being fetched
> than the ones at the tip of tracking branch the fetcher has for this
> uploader currently?
> 
> And the solution might be to tell only about the tips of remote tracking
> branches fetcher has obtained from this particular uploader, not about
> other remote tracking bracnesh it got from others or his own local
> branches (which may have merged from other remotes)?
> 
> It is a clever idea but I suspect it may not work well in practice.  For
> example, suppose a project is two-tier, say, with top-level and subsystem
> repositories, the former of which regularly merge from the latter, and you
> are a participant primarily working on the subsystem.  You fetch daily
> from the subsystem repository, but weekly from the top-level.
> 
> Now, when you fetch from the top-level, the remote tracking refs you have
> for it are much more stale than your other refs.  The top-level would have
> acquired a lot more commits from the same subsystem repository since you
> fetched from there the last time, and you already have many of them
> through your daily fetch from the subsystem repository.  To minimize the
> transfer in such a case, the fetcher does want to tell the uploader that
> it has those commits from the same subsystem repository, so that the
> commit walker can stop at a recent merge into the top-level from the
> subsystem repository.
> 
> There was a discussion about updating the commit walk exchange to bisect
> the history (skip and try a much older one to see if it is reachable, but
> to avoid overshooting, step back and see if a newer one is still common).
> It would be a lot more work and needs to be implemented as a new protocol
> capability, but I think it is the right way to go in the longer term.

I thought about this some more: it seems that nothing in
pack-protocol.txt dictates that client has to send have
lines in order. The whole logic would be on client side.

So a new capability will be there just in case we find a use for a
server-side optimization later on, we don't need the client to behave
differently in any way when this capability is enabled/disabled.
Right?

-- 
MST

  reply	other threads:[~2010-11-03  9:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21  0:47 problem cloning via http since v1.6.6-rc0 Yaroslav Halchenko
2010-01-21  1:34 ` Tay Ray Chuan
2010-01-21  1:36 ` Tay Ray Chuan
2010-01-21  2:33   ` Yaroslav Halchenko
2010-01-21  4:01     ` Tay Ray Chuan
2010-01-21  4:38       ` Yaroslav Halchenko
2010-01-21  5:08 ` Ilari Liusvaara
2010-01-21  6:47   ` Tay Ray Chuan
2010-01-21  7:51     ` Tay Ray Chuan
2010-01-21 14:00       ` Yaroslav Halchenko
2010-01-21 14:41         ` [PATCH] http/remote-curl: coddle picky servers Tay Ray Chuan
2010-01-21 15:56           ` Shawn O. Pearce
2010-01-21 16:07             ` Mike Hommey
2010-01-21 16:10               ` git fetch -v not at all verbose? Michael S. Tsirkin
2010-01-21 16:18                 ` Shawn O. Pearce
2010-01-21 16:35                   ` Michael S. Tsirkin
2010-01-21 16:57                     ` Shawn O. Pearce
2010-01-21 17:30                       ` Michael S. Tsirkin
2010-01-21 17:47                         ` Thomas Rast
2010-01-21 17:42                       ` Junio C Hamano
2010-11-03  9:52                         ` Michael S. Tsirkin [this message]
2010-11-03 16:14                           ` Junio C Hamano
2010-01-21 16:20               ` [PATCH] http/remote-curl: coddle picky servers Tay Ray Chuan
2010-01-21 16:24                 ` Shawn O. Pearce
2010-01-21 16:34                   ` Mike Hommey
2010-01-21 16:34                 ` Mike Hommey
2010-01-21 10:35     ` problem cloning via http since v1.6.6-rc0 Ilari Liusvaara
2010-01-21 11:36       ` Tay Ray Chuan

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=20101103095249.GA9144@redhat.com \
    --to=mst@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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).