Hi Julien, Sorry for not replying earlier.
On Fri, Jan 8, 2021 at 1:24 PM Julien Cristau <jcris...@debian.org> wrote: > > Hi Daniel, > [...] > > Can you provide the output of running hg status with the --profile > option, in both the faster and slower cases? There is an error in the command above, the fast case was using "python3.8", the slow case was using "python3.9". I reinstalled python3.8 to test again, but mercurial did not run with python3.8 anymore: -------------------- $ python3.8 /usr/bin/hg status Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mercurial/policy.py", line 69, in _importfrom fakelocals[modname] = mod = getattr(pkg, modname) File "/usr/lib/python3/dist-packages/mercurial/pycompat.py", line 303, in w return f(object, sysstr(name), *args) AttributeError: module 'mercurial.cext' has no attribute 'parsers' -------------------- But, I can't reproduce the slowdown anymore using current mercurial and python3.9 versions in unstable, now it is fast again: In an empty repository: -------------------- $ time /usr/bin/hg status real 0m0.126s user 0m0.113s sys 0m0.013s -------------------- And with "--profile": -------------------- $ time /usr/bin/hg status --profile | 100.0% 0.03s dispatch.py: run line 43: dispatch.run() | 100.0% 0.03s dispatch.py: dispatch line 113: status = dispatch(req) | 100.0% 0.03s dispatch.py: _runcatch line 303: ret = _runcatch(req) or 0 | 100.0% 0.03s dispatch.py: _callcatch line 479: return _callcatch(ui, _runc... | 100.0% 0.03s scmutil.py: callcatch line 488: return scmutil.callcatch(ui... | 100.0% 0.03s dispatch.py: _runcatchfunc line 153: return func() | 100.0% 0.03s dispatch.py: _dispatch line 469: return _dispatch(req) \ 33.3% 0.01s hg.py: repository line 1183: repo = hg.repository( | 33.3% 0.01s hg.py: _peerorrepo line 221: peer = _peerorrepo( | 33.3% 0.01s util.py: __getattribute__line 188: obj = _peerlookup(path).ins... | 33.3% 0.01s <frozen importlib._bootstrap_external>: exec_moduleline 245: self.__spec__.loader.exec_m... | 33.3% 0.01s <frozen importlib._bootstrap_external>: get_codeline 786: | 33.3% 0.01s <frozen importlib._bootstrap_external>: get_dataline 881: \ 33.3% 0.01s extensions.py: loadall line 1043: extensions.loadall(lui) | 33.3% 0.01s extensions.py: load line 301: load(ui, name, path, loadin... | 33.3% 0.01s pycompat.py: w line 224: minver = getattr(mod, 'mini... | 33.3% 0.01s util.py: __getattribute__line 303: return f(object, sysstr(nam... | 33.3% 0.01s <frozen importlib._bootstrap_external>: exec_moduleline 245: self.__spec__.loader.exec_m... | 33.3% 0.01s <frozen importlib._bootstrap>: _call_with_frames_removedline 790: | 33.3% 0.01s __init__.py: <module> line 228: | 33.3% 0.01s <frozen importlib._bootstrap>: _handle_fromlistline 15: from . import ( | 33.3% 0.01s <frozen importlib._bootstrap>: _call_with_frames_removedline 1058: | 33.3% 0.01s <frozen importlib._bootstrap>: _find_and_loadline 228: | 33.3% 0.01s <frozen importlib._bootstrap>: _find_and_load_unlockedline 1007: | 33.3% 0.01s <frozen importlib._bootstrap>: _find_specline 982: | 33.3% 0.01s demandimportpy3.py: find_spec line 925: | 33.3% 0.01s <frozen importlib._bootstrap_external>: find_specline 111: spec = find_spec(fullname, ... | 33.3% 0.01s <frozen importlib._bootstrap_external>: _get_specline 1349: | 33.3% 0.01s <frozen importlib._bootstrap_external>: find_specline 1321: | 33.3% 0.01s <frozen importlib._bootstrap_external>: _fill_cacheline 1450: \ 33.3% 0.01s dispatch.py: runcommand line 1232: return runcommand( | 33.3% 0.01s pager.py: pagecmd line 917: ret = _runcommand(ui, optio... | 33.3% 0.01s dispatch.py: _runcommand line 76: return orig(ui, options, cm... | 33.3% 0.01s dispatch.py: <lambda> line 1244: return cmdfunc() | 33.3% 0.01s util.py: check line 1230: d = lambda: util.checksigna... | 33.3% 0.01s util.py: check line 1867: return func(*args, **kwargs) | 33.3% 0.01s mq.py: mqcommand line 1867: return func(*args, **kwargs) | 33.3% 0.01s util.py: check line 4222: return orig(ui, repo, *args... | 33.3% 0.01s commands.py: status line 1867: return func(*args, **kwargs) | 33.3% 0.01s scmutil.py: match line 6657: m = scmutil.match(ctx2, pat... | 33.3% 0.01s scmutil.py: matchandpats line 940: return matchandpats(ctx, pa... | 33.3% 0.01s context.py: match line 922: m = ctx.match( | 33.3% 0.01s util.py: __getattribute__line 1752: return matchmod.match( | 33.3% 0.01s <frozen importlib._bootstrap_external>: exec_moduleline 245: self.__spec__.loader.exec_m... | 33.3% 0.01s <frozen importlib._bootstrap_external>: get_codeline 786: | 33.3% 0.01s <frozen importlib._bootstrap_external>: get_dataline 881: --- Sample count: 11 Total time: 0.030000 seconds (0.030000 wall) real 0m0.133s user 0m0.126s sys 0m0.009s -------------------- So, you can close the bug. Thanks. Daniel.