[Distutils] Cache PYTHONPATH? (Re: make unzipped eggs be the default)

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jul 29 03:02:12 CEST 2009


P.J. Eby wrote:

> So the optimum performance tradeoff depends on how many imports you have 
> *and* how many eggs you have on sys.path.  If you have lots of eggs and 
> few imports, unzipped ones will probably be faster.  If you have lots of 
> eggs and *lots* of imports, zipped ones will probably be faster.

I'm wondering whether something could be gained by
cacheing the results of sys.path lookups somehow
between interpreter invocations.

Most of the time the contents of the directories
on one's PYTHONPATH don't change, so doing all this
statting and directory reading every time an
interpreter starts up seems rather suboptimal.

-- 
Greg


More information about the Distutils-SIG mailing list