[Distutils] Caching entry points - performance

Thomas Kluyver thomas at kluyver.me.uk
Thu Nov 30 13:24:54 EST 2017


To pick up the caching discussion again, I've started to experiment with
a couple of different caching techniques.

The headline results: a cold-start scan of entry points goes from about
4.5 seconds with no caching, to 0.45 seconds with caching. There's only
a small difference (for me) between having a cache file per sys.path
directory and a single per-user cache file. I've posted lots more
details here: https://github.com/takluyver/entrypoints/issues/16

I keep my sys.path quite short, and the difference between the two
approaches presumably increases the more sys.path entries you have. If
anyone has time to test the different techniques, I'd be interested to
know what your results look like. I've put (Linux) instructions on the
same issue.

If you'd like to try with a different format or caching mechanism, feel
free to add some scripts and see how they compare.

I haven't yet tried to integrate either technique into the entrypoints
module.

Thomas


More information about the Distutils-SIG mailing list