Message409705
I'm still wondering why speed.python.org showed such a slowdown, and how we can revert that. Here's a new theory.
Thanks to an investigation I did together with Eric, I now suspect that the release of setuptools 60.0.0 on Dec 19 is a smoking gun. PyPerformance (re)installs the latest versions of pip and setuptools.
Setuptools 60.0 makes a change in the file distutils-precedence.pth that causes it (by default) to import something called _distutils_hack and to call its add_shim() function. In previous setuptools this was off by default, but in 60.0 it switched to on. See https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v6000
That add_shim() call in turn installs an extra entry in front of sys.meta_path, which does a bunch of extra work. See https://github.com/pypa/setuptools/blob/main/_distutils_hack/__init__.py
Pablo, can we change the PyPerformance configuration or the script that runs it to set and export SETUPTOOLS_USE_DISTUTILS=stdlib, to see whether that affects perf at all?
(Note that the code in distutils-precedence.pth is executed by site.py in addpackage().) |
|
Date |
User |
Action |
Args |
2022-01-04 19:57:42 | gvanrossum | set | recipients:
+ gvanrossum, terry.reedy, vstinner, eric.smith, lukasz.langa, eric.snow, serhiy.storchaka, Kojoley, lys.nikolaou, pablogsal, xtreak, Dennis Sweeney, charles.mcmarrow.4 |
2022-01-04 19:57:42 | gvanrossum | set | messageid: <1641326262.56.0.742271691802.issue46110@roundup.psfhosted.org> |
2022-01-04 19:57:42 | gvanrossum | link | issue46110 messages |
2022-01-04 19:57:42 | gvanrossum | create | |
|