Scott David Daniels <[EMAIL PROTECTED]> writes on Wed, 25 May 2005 07:10:00 -0700: > ... > I'll bet this means that the 'zope.zip', 'python24.zip' would drop > you to "about 12500 - 10000 = 2500" failing opens. That should be > an easy test: sys.path.insert(0, 'zope.zip') or whatever. > If that works and you want to drop even more, make a copy of zope.zip, > update it with python24.zip, and call the result python24.zip.
We can not significantly reduce the amount of opens further: Each module import from a zip archive opens the archive. As we have about 2.500 modules, we will get this order of opens (as long as we use Python's "zipimporter"). The "zipimporter" uses a sequence of "stat"s to determine whether it can handle a path item: it drops the last component until it gets an existing file object and then checks that it is indeed a zip archive. Adding a cache for this check could save an additional few hundreds of opens. Dieter -- http://mail.python.org/mailman/listinfo/python-list