git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Ralf Baechle <ralf@linux-mips.org>, Junio C Hamano <junkio@cox.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Slow fetches of tags
Date: Wed, 24 May 2006 10:21:41 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0605240947580.5623@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0605240931480.5623@g5.osdl.org>



On Wed, 24 May 2006, Linus Torvalds wrote:
> 
> Can you add a printout to show what the "taglist" is for you in 
> git-fetch.sh (just before the thing that does that
> 
> 	fetch_main "$taglist"
> 
> thing?). It _should_ have pruned out all the tags you already have.

Actually, looking at that tag-fetching logic, we already know that we have 
the objects that the tags point to (because those are the only kinds that 
we should auto-follow). I wonder if the slowness is because of all the 
have/want commit following, which walks the whole tree to say "I have 
this", when in this case we really should directly say "I have these" for 
the objects that the tags point to.

So the problem may be that we basically send a totally unnecessary list of 
all the objects we have, when the other end really only cares about the 
fact that we have the objects that the tags point to. Which we know we do, 
but we didn't say so, because "git-fetch" didn't really mark them that 
way.

And instead of sending the commits that we know we have, and that we know 
are the interesting ones and that will cut off the tag-object-walk, we 
start from all the local tips, and use the regular "parse commits in date 
order" thing and send "have" lines for everything we see that isn't 
common. Walking a lot of unnecessary crud.

Junio? Any ideas? I didn't want to do that tag-auto-following, and while I 
admit it's damn convenient, it's really quite broken, methinks. 

I almost suspect that we need to have a syntax where-by the local 
fetch-list ends up doing

	"$tagname:$tagname:$sha1wehave"

as the argument to fetch-pack, and then fetch-pack would be modified to 
send those "$sha1wehave" objects early as "have" objects. Ie start from 
something like

	diff --git a/git-fetch.sh b/git-fetch.sh
	index 280f62e..dce3812 100755
	--- a/git-fetch.sh
	+++ b/git-fetch.sh
	@@ -400,7 +400,7 @@ case "$no_tags$tags" in
	 			}
	 			git-cat-file -t "$sha1" >/dev/null 2>&1 || continue
	 			echo >&2 "Auto-following $name"
	-			echo ".${name}:${name}"
	+			echo ".${name}:${name}:${sha1}"
	 		done)
	 	esac
	 	case "$taglist" in

and then pass the info all the way up (the above patch will obviously 
result in a totally broken script, everything downstream from that point 
would have to be taught about the "already have this" part too).

Ralf, which repo is this, so that others (me, if I get the time and 
energy, Junio or some other hapless sucker^W^Whero if I'm lucky) can try 
things out?

		Linus

  reply	other threads:[~2006-05-24 17:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 13:10 Slow fetches of tags Ralf Baechle
2006-05-24 16:45 ` Linus Torvalds
2006-05-24 17:21   ` Linus Torvalds [this message]
2006-05-24 18:08     ` Junio C Hamano
2006-05-24 19:17       ` Linus Torvalds
2006-05-24 23:43         ` Linus Torvalds
2006-05-25  1:32           ` Junio C Hamano
2006-05-25  4:48             ` Junio C Hamano
2006-05-26 15:42               ` Ralf Baechle
2006-05-27  2:20                 ` [PATCH/RFC] upload-pack: stop "ack continue" when we know common commits for wanted refs Junio C Hamano
2006-05-25 13:12           ` Slow fetches of tags Ralf Baechle
2006-07-26 23:27             ` Junio C Hamano
2006-07-28 10:42               ` Johannes Schindelin
2006-07-28 11:12               ` [PATCH] Teach the git wrapper about --name-rev and --name-rev-by-tags Johannes Schindelin
2006-07-28 15:43                 ` Junio C Hamano
2006-07-28 16:59                 ` Linus Torvalds
2006-07-28 18:53                   ` Johannes Schindelin
2006-07-29 12:43                     ` Nguyễn Thái Ngọc Duy
2006-07-29 12:47                       ` Johannes Schindelin
2006-05-24 19:06     ` Slow fetches of tags Junio C Hamano
2006-05-24 18:08   ` Ralf Baechle
2006-05-24 18:41     ` Junio C Hamano
2006-05-25 13:27       ` Ralf Baechle

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=Pine.LNX.4.64.0605240947580.5623@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=ralf@linux-mips.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).