threads / discuss / 4236

Local clone/fetch with cogito is glacial

Subject: Local clone/fetch with cogito is glacial

## tl;dr

11 messages between May 21, 2006 and May 22, 2006.

replies: 10people: 4as markdown or json

H. Peter Anvin· May 21, 2006, 23:47 UTC · lore

It appears that doing a *local* -- meaning using a file path or file URL -- clone or fetch with cogito is just glacial when the repository has an even moderate number of tags (and it's fetching the tags that takes all the time.) That's a really serious problem for me.

	-hpa
Sean· May 22, 2006, 01:20 UTC · re: H. Peter Anvin · lore

Re: Local clone/fetch with cogito is glacial

On Sun, 21 May 2006 16:47:45 -0700 "H. Peter Anvin" <hpa@zytor.com> wrote:

Show 5 quoted lines
> It appears that doing a *local* -- meaning using a file path or file URL 
> -- clone or fetch with cogito is just glacial when the repository has an 
> even moderate number of tags (and it's fetching the tags that takes all 
> the time.)  That's a really serious problem for me.
> 
Peter, does git clone work acceptably for you?
Sean
H. Peter Anvin· May 22, 2006, 21:18 UTC · re: Sean · lore

Re: Local clone/fetch with cogito is glacial

Sean wrote:
Show 11 quoted lines
> On Sun, 21 May 2006 16:47:45 -0700
> "H. Peter Anvin" <hpa@zytor.com> wrote:
> 
>> It appears that doing a *local* -- meaning using a file path or file URL 
>> -- clone or fetch with cogito is just glacial when the repository has an 
>> even moderate number of tags (and it's fetching the tags that takes all 
>> the time.)  That's a really serious problem for me.
>>
> 
> Peter, does git clone work acceptably for you?
> 

Well, it does, except it doesn't set up the cogito branches (which one can of course copy manually.)

cg-clone probably should be rewritten as a thin wrapper around git-clone.
	-hpa
Petr Baudis· May 22, 2006, 22:02 UTC · re: H. Peter Anvin · lore

Re: Local clone/fetch with cogito is glacial

Dear diary, on Mon, May 22, 2006 at 11:18:07PM CEST, I got a letter where "H. Peter Anvin" <hpa@zytor.com> said that...

Show 15 quoted lines
> Sean wrote:
> >On Sun, 21 May 2006 16:47:45 -0700
> >"H. Peter Anvin" <hpa@zytor.com> wrote:
> >
> >>It appears that doing a *local* -- meaning using a file path or file URL 
> >>-- clone or fetch with cogito is just glacial when the repository has an 
> >>even moderate number of tags (and it's fetching the tags that takes all 
> >>the time.)  That's a really serious problem for me.
> >>
> >
> >Peter, does git clone work acceptably for you?
> >
> 
> Well, it does, except it doesn't set up the cogito branches (which one can 
> of course copy manually.)

What about incremental fetches using git-fetch? From a quick scan of the git-fetch automagic tags following code, it seems to be even significantly more expensive than Cogito's (in terms of number of forks).

git-clone has an advantage here since it clones _everything_ while Cogito fetches only stuff related to the branch you are cloning, and verifying if what it fetches is sensible for you unfortunately takes a lot of time. :/ I guess there is no way to verify presence of multiple objects at once and there is also no way to order local fetch of multiple objects at once.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
H. Peter Anvin· May 22, 2006, 22:23 UTC · re: Petr Baudis · lore

Re: Local clone/fetch with cogito is glacial

Petr Baudis wrote:
Show 6 quoted lines
> 
> What about incremental fetches using git-fetch? From a quick scan of the
> git-fetch automagic tags following code, it seems to be even
> significantly more expensive than Cogito's (in terms of number of
> forks).
> 
Well, I haven't used git-fetch, so I can't comment on that one.
Show 6 quoted lines
> git-clone has an advantage here since it clones _everything_ while
> Cogito fetches only stuff related to the branch you are cloning, and
> verifying if what it fetches is sensible for you unfortunately takes a
> lot of time. :/ I guess there is no way to verify presence of multiple
> objects at once and there is also no way to order local fetch of
> multiple objects at once.

Note that non-local cg-clones are at least an order of magnitude faster, even when the nonlocal is just git+ssh:. One could presumably do the same thing over a pipe.

	-hpa
Petr Baudis· May 22, 2006, 22:50 UTC · re: H. Peter Anvin · lore

Re: Local clone/fetch with cogito is glacial

Dear diary, on Tue, May 23, 2006 at 12:23:44AM CEST, I got a letter where "H. Peter Anvin" <hpa@zytor.com> said that...

Show 11 quoted lines
> Petr Baudis wrote:
> >git-clone has an advantage here since it clones _everything_ while
> >Cogito fetches only stuff related to the branch you are cloning, and
> >verifying if what it fetches is sensible for you unfortunately takes a
> >lot of time. :/ I guess there is no way to verify presence of multiple
> >objects at once and there is also no way to order local fetch of
> >multiple objects at once.
> 
> Note that non-local cg-clones are at least an order of magnitude faster, 
> even when the nonlocal is just git+ssh:.  One could presumably do the same 
> thing over a pipe.

Even rsync and HTTP cg-clones? git:// and git+ssh:// fetching follows an almost entirely different code patch and it's much more efficient since I just accumulate the tag object ids I want to check and then pour them to git-fetch-pack - I cannot do that with git-(local|http)-fetch. :-(

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
H. Peter Anvin· May 22, 2006, 23:03 UTC · re: Petr Baudis · lore

Re: Local clone/fetch with cogito is glacial

Petr Baudis wrote:
Show 6 quoted lines
> 
> Even rsync and HTTP cg-clones? git:// and git+ssh:// fetching follows an
> almost entirely different code patch and it's much more efficient since
> I just accumulate the tag object ids I want to check and then pour them
> to git-fetch-pack - I cannot do that with git-(local|http)-fetch. :-(
> 

No, but git-fetch-pack could operate over a local pipe just fine (after all, all it does is ssh an "git-send-pack" command to the other side.)

	-hpa
Petr Baudis· May 22, 2006, 23:08 UTC · re: H. Peter Anvin · lore

Re: Local clone/fetch with cogito is glacial

Dear diary, on Tue, May 23, 2006 at 01:03:06AM CEST, I got a letter where "H. Peter Anvin" <hpa@zytor.com> said that...

Show 10 quoted lines
> Petr Baudis wrote:
> >
> >Even rsync and HTTP cg-clones? git:// and git+ssh:// fetching follows an
> >almost entirely different code patch and it's much more efficient since
> >I just accumulate the tag object ids I want to check and then pour them
> >to git-fetch-pack - I cannot do that with git-(local|http)-fetch. :-(
> >
> 
> No, but git-fetch-pack could operate over a local pipe just fine (after 
> all, all it does is ssh an "git-send-pack" command to the other side.)

Yes, but in that case it couldn't hardlink the objects so you would see quite a big bump in disk usage if you have many local clones of the same repo.

That said, hardlinking is probably not all that big an advantage if you repack often, repack everywhere, and in the many-repositories cases it might be more sensible to use alternates (which is what cg-clone -l should really do instead of symlinking), so it might be well worth the sacrifice.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Linus Torvalds· May 22, 2006, 23:18 UTC · re: Petr Baudis · lore

Re: Local clone/fetch with cogito is glacial

On Tue, 23 May 2006, Petr Baudis wrote:
Show 5 quoted lines
> 
> Even rsync and HTTP cg-clones? git:// and git+ssh:// fetching follows an
> almost entirely different code patch and it's much more efficient since
> I just accumulate the tag object ids I want to check and then pour them
> to git-fetch-pack - I cannot do that with git-(local|http)-fetch. :-(

Sure you can. Well, not to http-fetch, but git-fetch-pack should work fine for a local repo.

The git-clone script will literally special-case rsync:// and http://. Everything else should work fine with git-fetch-pack.

		Linus
Petr Baudis· May 22, 2006, 23:24 UTC · re: Linus Torvalds · lore

Re: Local clone/fetch with cogito is glacial

> The git-clone script will literally special-case rsync:// and http://. 
> Everything else should work fine with git-fetch-pack.

Aha, I overlooked that what I described goes on in git-clone happens only with git-clone -l, otherwise it indeed seems to use git-fetch-pack. Sorry about the confusion.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Linus Torvalds· May 22, 2006, 01:40 UTC · re: H. Peter Anvin · lore

Re: Local clone/fetch with cogito is glacial

On Sun, 21 May 2006, H. Peter Anvin wrote:
Show 5 quoted lines
>
> It appears that doing a *local* -- meaning using a file path or file URL -- 
> clone or fetch with cogito is just glacial when the repository has an even
> moderate number of tags (and it's fetching the tags that takes all the time.)
> That's a really serious problem for me.
I think this is purely a cogito problem. 
Use "git clone" instead.
		Linus

← back to recent threads