Performance when working directory is slow network drive

Mark Hadfield m.hadfield at niwa.cri.nz
Sun Mar 4 16:10:55 EST 2001


"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:7uIn6.16286$Qb7.2659111 at newsb.telia.net...
> Mark Hadfield wrote:
> > 1. Why having the current directory in the search path affects the
import
> > time for the os module much more than it does for other modules I tested
> > (like string). Is this because os is a package?
>
> try running the interpreter with -vv (very verbose) might
> give you additional clues:
>
>     python -vv -c "import os"
>
> (look for "trying" messages)

Yes. It's clear from the speed at which the output appears on the screen
that the delays occur during the following operations

# trying os.pyd
# trying os.dll
# trying os.py
# trying os.pyc

then later when it tries the same thing with ntpath, stat and UserDict.

Thank you.
---
Mark Hadfield
m.hadfield at niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research





More information about the Python-list mailing list