Evolution of Mercurial startup Time

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Nov 6 06:28:47 EST 2019



On 11/6/19 12:09 PM, Pierre-Yves David wrote:
> [This is purely informative message, I just wanted to share some data I 
> looked at with you]
> 
> Hello all,
> 
> Last week, we added Python3 support for our benchmark suite. In 
> addition, we recently (re-)added a benchmark for `hg version`.
> 
> 
> `hg version` being a very simple command, it is usually a good 
> approximation of the time it take to get to any useful code in Mercurial.
> 
> ## Python 2 vs Python 3
> 
> - 42ms — hg 5.2 with Python 2
> - 67ms — hg 5.2 with Python 3
> 
> So we take a 25ms (+60%) startup time hit with Python 3
> 
> ## Zlib vs Zstd
> 
> - 42ms — hg 5.2 with Python 2 and Zlib
> - 39ms — hg 5.2 with Python 2 and Zstd
> 
> I have no idea why but the zstd variant of the repositories consistently 
> start 3ms (-7%) faster ‽

My bad, the difference is not Zlib/Zstd, but having sparse-revlog on or off.

> 
> ## Mercurial 3.0 vs Mercurial 5.2
> 
> - 18ms — hg 3.0 with Python 2
> - 42ms — hg 5.2 with Python 2
> 
> So Mercurial startup significantly slowed down over the past 5 years, 
> 24ms (+130%).
> 
> 
> You can have a look at the full graph here:
> 
> ## Stable branch commit (with Python 3 timing):
> 
> 
> https://beta-perf.octobus.net/#simple_command.read.version.default.time_bench?os=Linux%204.19.0-5-amd64&branch=stable&ram=32639644&env-HGWITHRUSTEXT=cpython&p-repo-format-compression='zlib'&p-repo-format-compression='zstd'&env-HGMODULEPOLICY=c&p-repo='mercurial-2018-08-01' 
> 
> 
> ## default branch commit
> 
> https://beta-perf.octobus.net/#simple_command.read.version.default.time_bench?os=Linux%204.19.0-5-amd64&branch=default&ram=32639644&env-HGWITHRUSTEXT=cpython&p-repo-format-compression='zlib'&p-repo-format-compression='zstd'&p-repo='mercurial-2018-08-01'&env-HGMODULEPOLICY=c 
> 
> 

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list