Network performance problems when pulling and cloning from HTTP server

Antoine Pitrou solipsis at pitrou.net
Sat Nov 24 17:44:45 UTC 2012


Angel Ezquerra <ezquerra <at> gmail.com> writes:
> 
> I did ran "hg bundle --all --profile foo.bundle" three times. The
> second and third times I also added --time:
> 
> C:\mercurial_tests\tmp_bigfiles_not_large>hg bundle --all --profile foo.bundle
> 2 changesets found
>    CallCount    Recursive    Total(ms)   Inline(ms) module:lineno(function)
>           26            0     85.1904     79.0038
> <mercurial\util.pyo>:863(read)

Here is a hypothesis: a quick look at chunkbuffer.read() in mercurial.util
seems to show that it uses repeated concatenating to a str object (the `buf`
variable), which is known to be quadratic under Windows. So if you happen
to request a big chunk of data from that function, you may indeed consume
a lot of CPU time.

That's assuming the read() at line 863 in your Mercurial version is indeed
chunkbuffer.read().

My two cents.

Regards

Antoine.







More information about the Mercurial mailing list