Re: Basic import Questions (with bonus profiling question)
- From: Fredrik Lundh <fredrik@xxxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 19:42:17 +0200
Gregory Piñero 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?
that it takes just under two seconds to start the interpreter ten times. not stunningly fast, but not too bad.
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.
what module is this? if it takes 5.5 seconds to import a single module, something isn't quite right.
</F>
.
- Prev by Date: Re: How to avoid a warning message box when sending email via Outlook
- Next by Date: tkSimpleDialog fails
- Previous by thread: Re: Basic import Questions (with bonus profiling question)
- Next by thread: Re: Basic import Questions (with bonus profiling question)
- Index(es):
Relevant Pages
|