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 Ian.H
Recipients Ian.H
Date 2021-04-20.17:00:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618938051.55.0.304648722652.issue43895@roundup.psfhosted.org>
In-reply-to
Content
While working on another project I noticed that there's a cache of shared object handles kept inside _PyImport_FindSharedFuncptr. See https://github.com/python/cpython/blob/b2b6cd00c6329426fc3b34700f2e22155b44168c/Python/dynload_shlib.c#L51-L55. It appears to be an optimization to work around poor caching of shared object handles in old libc implementations. After some testing, I have been unable to find any meaningful performance difference from this cache, so I propose we remove it to save the space.

My initial tests were on Linux (Ubuntu 18.04). I saw no discernible difference in the time for running the Python test suite with a single thread. Running the test suite using a single thread shows a lot of variance, but after running with and without the cache 40 times the mean times with/without the cache was nearly the same. Interpreter startup time also appears to be unaffected. This was all with a debug build, so I'm in the process of collecting data with a release build to see if that changes anything.
History
Date User Action Args
2021-04-20 17:00:51Ian.Hsetrecipients: + Ian.H
2021-04-20 17:00:51Ian.Hsetmessageid: <1618938051.55.0.304648722652.issue43895@roundup.psfhosted.org>
2021-04-20 17:00:51Ian.Hlinkissue43895 messages
2021-04-20 17:00:51Ian.Hcreate