python24.zip

"Martin v. Löwis" martin at v.loewis.de
Sun May 22 15:24:41 EDT 2005


Dieter Maurer wrote:
> Really?
> 
> Is the interpreter unable to call "C" functions ("stat" for example)
> to determine whether an object exists before it puts it on "path".

What do you mean, "unable to"? It just doesn't.

Could it? Perhaps, if somebody wrote a patch.
Would the patch be accepted? Perhaps, if it didn't break something
else.

In the past, there was a silent guarantee that you could add
items to sys.path, and only later create the directories behind
these items. I don't know whether people rely on this guarantee.

> The application was Zope importing about 2.500 modules
> from 2 zip files "zope.zip" and "python24.zip".
> This resulted in about 12.500 opens -- about 4 times more
> than would be expected -- about 10.000 of them failing opens.

I see. Out of curiosity: how much startup time was saved
when sys.path was explicitly stripped to only contain these
two zip files?

I would expect that importing 2500 modules takes *way*
more time than doing 10.000 failed opens.

Regards,
Martin



More information about the Python-list mailing list