subrepo speed optimizations

Greg Ward greg at gerg.ca
Thu Aug 9 01:59:46 UTC 2012


On 07 August 2012, Todd Greer said:

> One of the problems with using subrepos is that it makes push
> operations too slow (50-60 sec with no changes to push), at least in
> my company. If I can write an extension that just tweaks pushing, I
> can avoid having to write my own version of subrepos. (For comparison,
> pushing a repo without any subrepos takes me around 4 seconds.) This
> time appears to be spent almost entirely on sequentially pushing 28
> subrepos, each of which has no changes.

Are you using subrepos in your main workaday repository? Or have you
divided things up so there is a meta-repository, or many
meta-repositories, that just contain .hgsub* (and maybe build scripts)
to tie everything together?

I suspect the "slow push" problem is one of the reasons that best
practice with subrepos is to use a metarepo to tie together the
dependencies for a particular product. Most people, most of the time,
can just push in one of the "real" repos which contain your code, but
not subrepos. It's only when you need to update the .hgsubstate that
ties things together that you have to endure a slow push, and that
should be infrequent.

       Greg
-- 
Greg Ward                                http://www.gerg.ca/
Earn cash in your spare time -- blackmail your friends!



More information about the Mercurial mailing list