speeding up hg pull?
Matt Mackall
mpm at selenic.com
Mon Aug 27 20:17:22 UTC 2012
On Mon, 2012-08-27 at 23:49 +1200, Ryan Brown wrote:
> > How long does it take to start an ssh shell connection without
> > Mercurial?
>
> about 1-2 secs (around 140-150ms)
I'm going to assume the apparently completely contradictory second set
of numbers is ping time.
Also, it was unhelpful to delete the original context, as I've now
forgotten it and needed to consult my archives. An empty pull should
generally be about as fast as an ssh connection:
$ time ssh waste.org echo foo
foo
real 0m0.325s
user 0m0.003s
sys 0m0.020s
$ time hg in default-push --debug | cat
running ssh server.org 'hg -R repo/hg serve --stdio'
sending hello command
sending between command
remote: 145
remote: capabilities: lookup changegroupsubset branchmap pushkey known
getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN
httpheader=1024
remote: 1
comparing with ssh://server.org/repo/hg
query 1; heads
sending batch command
searching for changes
all remote heads known locally
no changes found
real 0m0.589s
user 0m0.053s
sys 0m0.043s
> How would you speed up ssh auth's via hg? When I use putty its pretty
> quick to initiate a login.
Mercurial auth over ssh should be exactly as fast as plain ssh auth
(provided you're using an agent for both). Try to get verbose output
from putty together with debug output from hg. Something like this
should work:
hg outgoing -e "plink -v" --debug
Send that along with annotation of where it's pausing. You might try
comparing the above with a normal putty connection.
> I was thinking if hg kept the ssh tunnel open till you've finished
> with it (or a timeout x seconds), rather than close it before I push
> it out (hg push is also slow)
Mercurial uses one ssh connection per invocation. Since it's not a
daemon, it can't hold connections open.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list