Is __import__ known to be slow in windows?

Joshua Kugler jkugler at bigfoot.com
Fri Nov 30 20:51:51 EST 2007


> What modules are you __import__ing, and what is platform-dependent in
> each?

The only thing we're importing __import__ are some modules of ours, with no
sytem dependent code in them at all.  Some of them are even empty modules,
as was suggested by one response (for benchmarking purposes).

Turning off Symantec's on-access checking shaved about a bunch of time off
the time spent in __import__ (10 seconds vs 16), but still too high.

Commenting out the import of the only system dependent code we have in our
project (which we don't "manually" import via an __import__ call) produced
no change in run time.

So, we've found a major culprit.  I'll see if I can find more.

Thanks for the pointers so far.

j




More information about the Python-list mailing list