Restricting import file lookup for pyd, dll, ...

Fredrik Lundh fredrik at pythonware.com
Fri Oct 20 01:23:40 EDT 2006


Bernard Lebel wrote:

> That's because I'm using Python through another application, via the
> pywin32 extensions. When that other application starts, it performs
> several thousands of file requests (we're talking 4,500, roughly) in
> the Python installation, locations where there are Python files, and
> in some other locations that don't make sense. This adds considerable
> time to the startup time of the application, we're talking between 2
> and 9 seconds.

a plain Python 2.4 interpreter can start, execute a command, and shut 
down in about 0.13 seconds on my machine.  2.5 does the same thing in 
0.10 seconds.

are you sure you're benchmarking *Python's* start up time, and not the 
time it takes to load all the modules used by your application, or the 
time it takes for "filemon" to print all those 4500 requests to the 
monitor window?

</F>




More information about the Python-list mailing list