Re: Any tips for improving the performance of cloning large repositories?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Any tips for improving the performance of cloning large repositories?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:39

Alex Bennee [off-list ref] writes:
Well that's counter intuitive....

 - reverting the original repo to one big pack speeds up the clone
 - adding a --local --reference mirror slows it down
Neither is. Read what "--local" says in the help text of clone. It
disables the git aware clever optimization.

Re: Any tips for improving the performance of cloning large repositories?

From: Alex Bennee <hidden>
Date: 2016-06-15 22:52:39

On 16 December 2011 17:08, Junio C Hamano [off-list ref] wrote:
Alex Bennee [off-list ref] writes:
quoted
Well that's counter intuitive....

 - reverting the original repo to one big pack speeds up the clone
 - adding a --local --reference mirror slows it down
Neither is. Read what "--local" says in the help text of clone. It
disables the git aware clever optimization.
OK that's not how I read the man page:

       --local, -l
           When the repository to clone from is on a local machine,
this flag bypasses the normal "git aware" transport
           mechanism and clones the repository by making a copy of
HEAD and everything under objects and refs directories.

So this says it skips "git aware" (whatever that means)

           The files under .git/objects/ directory are hardlinked to
save space when possible. This is now the default when
           the source repository is specified with /path/to/repo
syntax, so it essentially is a no-op option. To force
           copying instead of hardlinking (which may be desirable if
you are trying to make a back-up of your repository),
           but still avoid the usual "git aware" transport mechanism,
--no-hardlinks can be used.

And this says that objects on the local file-system are hardlinked
(rather than copied) which I assumed was a optimal approach.

       --no-hardlinks
           Optimize the cloning process from a repository on a local
filesystem by copying files under .git/objects
           directory.

I'm not sure how this is an optimization? This means more copying
rather than linking right?

-- 
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help