[Python-3000] Import system questions to be considered for Py3k

Giovanni Bajo rasky at develer.com
Tue Jul 18 22:45:01 CEST 2006


Nick Coghlan wrote:

> Rationalise *.pkg and *.pth files
> ---------------------------------
> [...]
>
> Use an interpreter configuration file?
> --------------------------------------

When dealing with these issues, please consider also startup time. Python is
already "pretty slow" at startup, and I hope Py3k doesn't get any worse (it
should get much better, if anything). I'm sure you all can find out a way to
rationalite these startup import stuff so that they are faster. I'm afraid I
don't have any constructive suggestion since I'm not knowledgable enough.

$ strace python -c "print ''" 2>&1 | wc -l
855
$ strace perl -e "print ''" 2>&1 | wc -l
327

Stuff like:

stat64("/usr/lib/python24.zip/posixpath", 0xbfd8f934) = -1 ENOENT (No such
file or directory)
open("/usr/lib/python24.zip/posixpath.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
open("/usr/lib/python24.zip/posixpathmodule.so", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
open("/usr/lib/python24.zip/posixpath.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
open("/usr/lib/python24.zip/posixpath.pyc", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)

is at least questionable, given that /usr/lib/python24.zip does not even
exist.
-- 
Giovanni Bajo



More information about the Python-3000 mailing list