This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients Dennis Sweeney, Kojoley, charles.mcmarrow.4, eric.smith, eric.snow, gvanrossum, lukasz.langa, lys.nikolaou, pablogsal, serhiy.storchaka, terry.reedy, vstinner, xtreak
Date 2022-01-04.19:57:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641326262.56.0.742271691802.issue46110@roundup.psfhosted.org>
In-reply-to
Content
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().)
History
Date User Action Args
2022-01-04 19:57:42gvanrossumsetrecipients: + 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:42gvanrossumsetmessageid: <1641326262.56.0.742271691802.issue46110@roundup.psfhosted.org>
2022-01-04 19:57:42gvanrossumlinkissue46110 messages
2022-01-04 19:57:42gvanrossumcreate