# Local clone/fetch with cogito is glacial

11 messages from 2006-05-21 to 2006-05-22. Participants: H. Peter Anvin, Sean, Linus Torvalds, Petr Baudis.
Thread: https://gitlist.dev/t/4236

## H. Peter Anvin, 2006-05-21 23:47

Subject: Local clone/fetch with cogito is glacial
Message-ID: <4470FC21.6010104@zytor.com>
URL: https://gitlist.dev/e/4470FC21.6010104%40zytor.com

```
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, 2006-05-22 01:20

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <BAYC1-PASMTP11FDE05B530CFF43C043E5AE9A0@CEZ.ICE>
URL: https://gitlist.dev/e/BAYC1-PASMTP11FDE05B530CFF43C043E5AE9A0%40CEZ.ICE
In-Reply-To: <4470FC21.6010104@zytor.com>

```
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?

Sean

```

## Linus Torvalds, 2006-05-22 01:40

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <Pine.LNX.4.64.0605211840210.3649@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0605211840210.3649%40g5.osdl.org
In-Reply-To: <4470FC21.6010104@zytor.com>

```


On Sun, 21 May 2006, H. Peter Anvin 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.

I think this is purely a cogito problem. 

Use "git clone" instead.

		Linus

```

## H. Peter Anvin, 2006-05-22 21:18

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <44722A8F.9020609@zytor.com>
URL: https://gitlist.dev/e/44722A8F.9020609%40zytor.com
In-Reply-To: <BAYC1-PASMTP11FDE05B530CFF43C043E5AE9A0@CEZ.ICE>

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

cg-clone probably should be rewritten as a thin wrapper around git-clone.

	-hpa

```

## Petr Baudis, 2006-05-22 22:02

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <20060522220206.GA10488@pasky.or.cz>
URL: https://gitlist.dev/e/20060522220206.GA10488%40pasky.or.cz
In-Reply-To: <44722A8F.9020609@zytor.com>

```
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...
> 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, 2006-05-22 22:23

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <447239F0.9030705@zytor.com>
URL: https://gitlist.dev/e/447239F0.9030705%40zytor.com
In-Reply-To: <20060522220206.GA10488@pasky.or.cz>

```
Petr Baudis wrote:
> 
> 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.

> 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, 2006-05-22 22:50

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <20060522225054.GL11941@pasky.or.cz>
URL: https://gitlist.dev/e/20060522225054.GL11941%40pasky.or.cz
In-Reply-To: <447239F0.9030705@zytor.com>

```
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...
> 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, 2006-05-22 23:03

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <4472432A.8010002@zytor.com>
URL: https://gitlist.dev/e/4472432A.8010002%40zytor.com
In-Reply-To: <20060522225054.GL11941@pasky.or.cz>

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

	-hpa

```

## Petr Baudis, 2006-05-22 23:08

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <20060522230841.GM11941@pasky.or.cz>
URL: https://gitlist.dev/e/20060522230841.GM11941%40pasky.or.cz
In-Reply-To: <4472432A.8010002@zytor.com>

```
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...
> 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, 2006-05-22 23:18

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <Pine.LNX.4.64.0605221615030.3697@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0605221615030.3697%40g5.osdl.org
In-Reply-To: <20060522225054.GL11941@pasky.or.cz>

```


On Tue, 23 May 2006, 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. :-(

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, 2006-05-22 23:24

Subject: Re: Local clone/fetch with cogito is glacial
Message-ID: <20060522232437.GN11941@pasky.or.cz>
URL: https://gitlist.dev/e/20060522232437.GN11941%40pasky.or.cz
In-Reply-To: <Pine.LNX.4.64.0605221615030.3697@g5.osdl.org>

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

```
