Basic import Questions (with bonus profiling question)
Gregory Piñero
gregpinero at gmail.com
Thu Aug 31 13:02:24 EDT 2006
On 8/31/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> several seconds? sounds bad. what does the following script print on
> your machine?
>
> import time, subprocess, sys
>
> t0 = time.time()
> for i in range(10):
> subprocess.call([sys.executable, "-c", "pass"])
> print time.time() - t0
It prints 1.92199993134
What does that mean?
By the way, I thought I was importing just a file path from a module
but like you said it was importing the entire module. I got rid of
that import statement and the time dropped from 7 seconds to 1.5
seconds.
Any other tips for speeding up python load time for IIS? (I mean
really simply tips, I don't have time anything soon to fool with
fastCGI for IIS or setting up ASP)
-Greg
More information about the Python-list
mailing list