subrepo speed optimizations

Todd Greer TGreer at affinegy.com
Tue Aug 7 22:09:57 UTC 2012


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.

Would it be possible to write an extension that modified the behavior of subrepos as follows?

On push, only push subrepos if they actually need to be pushed. This would be judged by whether the changeset being pushed in the parent repo includes any changes to .hgsubstate. (This could be further improved by only pushing the specific subrepos that have changed, but the simpler check may be good enough.)

This would replace a large number of slow checks with a remote server with one check that can be done entirely locally, and would save my team nearly a minute per push. It would also mitigate the impression they have that Mercurial is slow.

I know how to write a trivial extension, but I don't know whether it's possible to make this kind of modification. I do understand that I would probably be making an extension that was extremely likely to be broken by Mercurial updates--I'm OK with that.

I appreciate any help you can offer.

Thank you,
Todd

Todd Greer, Director of Development, Affinegy, Inc.
1705 S. Capital of Texas Hwy, Ste. 310, Austin, TX, 78746 O 512.535.1700 | F 512.233.2477 tgreer at affinegy.com    
http://affinegy.com



More information about the Mercurial mailing list