hg archive (files) performance regression.

Vincent Parrett vincent at finalbuilder.com
Fri Mar 2 05:31:53 UTC 2018


Somewhere between hg 4.2.2 and 4.5 the archive (files, to empty folder) 
command gotten around 10-13% slower.

Testing on windows 10 x64 (latest updates), between two ssd drives :

hg 4.5 :
---------------------------------------------------------------------------------
"C:\Program Files\Mercurial\hg.exe" archive --time --subrepos 
--no-decode --quiet --profile c:\temp\archive9
Total time: 20.218750 seconds
time: real 23.745 secs (user 8.109+0.000 sys 12.688+0.000)
---------------------------------------------------------------------------------

hg 4.2.2
---------------------------------------------------------------------------------

"C:\Program Files\Mercurial-422\hg.exe" archive --time --subrepos 
--no-decode --quiet --profile c:\temp\archive10
Total time: 15.984375 seconds
time: real 20.678 secs (user 7.234+0.000 sys 9.297+0.000)
---------------------------------------------------------------------------------

I've confirmed this with a few different repos, the example above has 
lots of large files, I tested with others with thousands of source files 
and the slow down is is still around the 10-13% mark.

I'm not a python dev (mostly c# and delphi), so still getting my head 
around the hg code base, but I'm curious why the atomictemp=true is used 
in fileit.addfile? I get that it's in the vfs to work around file 
locking issues, but with the archive command with type files, it's 
likely that the archive is going to an empty target directory and this 
seems wasteful.

Is there anything else that can be done to speed up the archive (to 
files) command?

-- 

Regards

Vincent Parrett

CEO - VSoft Technologies Pty Ltd
https://www.finalbuilder.com
Blog: https://www.finalbuilder.com/resources/blogs
Automate your Software builds with FinalBuilder.
Open Source : https://github.com/VSoftTechnologies




More information about the Mercurial-devel mailing list