[Distutils] formencode as .egg in Debian ??

Phillip J. Eby pje at telecommunity.com
Tue Nov 22 21:33:39 CET 2005


At 06:33 PM 11/22/2005 +0100, M.-A. Lemburg wrote:
>Phillip J. Eby wrote:
> >
> > Yes, it's true, zipfile import processing is faster than normal import
> > processing;
>
>Only after *all* ZIP files on sys.path have been scanned
>for their contents. The more you add to sys.path, the longer
>Python takes to startup.

This is simply not true.  If you don't believe PEP 302 and site.py, measure 
it for yourself.  The *only* addition to startup is the time to actually 
read the .pth file and append the entries to the list.


>What's worse is that the slow-down affects the whole Python
>installation - each and every application using Python will
>have to scan all these ZIP files in case it tries to import
>a non-existing module or one which it finds late on sys.path.

And how often do programs attempt to import non-existing modules along 
performance critical paths?

Note by the way that "scan all these ZIP files" is a misleading term in any 
case - the files are not "scanned".  They are opened, and a small amount of 
data is read from the end of the file.  Nothing that I would consider 
"scanning" is involved.



More information about the Distutils-SIG mailing list