All of those calls to open are being generated from the pytz import --
which is why pytz seems like the likely candidate. Is it possible you
have pytz installed as a compressed egg, or on a remote disk, or
something that may be causing a file reading penalty?
As Eric said, make sure you time
Michael Droettboom wrote:
All of those calls to open are being generated from the pytz import --
which is why pytz seems like the likely candidate. Is it possible you
have pytz installed as a compressed egg, or on a remote disk, or
something that may be causing a file reading penalty?
My gut says it's probably the GUI framework import that is dominating
the time. Which backend are you using? Does importing it take a large
amount of time as well?
Can you provide a profiler output file we can examine to narrow it
down? The following from a command prompt should be
On Fri, Apr 2, 2010 at 8:28 AM, Michael Droettboom md...@stsci.edu wrote:
My gut says it's probably the GUI framework import that is dominating
the time. Which backend are you using? Does importing it take a large
amount of time as well?
Can you provide a profiler output file we can
Can you provide the actual saved profiler data? The output of the
command itself doesn't provide enough information to diagnose the
problem, since it doesn't have full file paths etc.
When you do (thanks Gökhan for the less verbose version):
python.exe -c import cProfile;
It looks like most of the time is being taken up by pytz (timezone
library), which opens ~500 files. How does the total time of import
pytz compare?
Mike
Andrew Kelly wrote:
I see. I was wondering why it spit out a binary file.
test.out is attached...
-Andy
On Fri, Apr 2, 2010 at
import pytz only took 0.0 seconds.
I actually just ran that pstats module and there is one line that stuck out
at me:
ncalls tottime percall cumtime percall filename:lineno(function)
10.0000.0000.0000.000
C:\Python26\lib\os.py:35(_get_exports_list)
560
Andrew Kelly wrote:
import pytz only took 0.0 seconds.
Sounds like it was already imported, so you were not really timing that
import.
On linux (ubuntu 9.10, Lenovo T60 laptop) importing pytz takes longer
than importing numpy:
efir...@manini:~$ time python -c import pytz
real
Has anyone had any success in speeding up the mpl imports?
import matplotlib.pyplot as plt
( or from matplotlib.figure import Figure)
takes 6 full seconds to load. That seems excessive. Any ideas?
-Andy
--
Download
Hmm, I wrote one time a lazy-import module, you create objects and use
their attributes, but the object imports the module not earlier than
the first attribute access. Thus these objects are used like the
module via import module. I.e., module = Lazy('matplotlib.module').
There are also
Andrew Kelly wrote:
Has anyone had any success in speeding up the mpl imports?
import matplotlib.pyplot as plt
( or from matplotlib.figure import Figure)
takes 6 full seconds to load. That seems excessive. Any ideas?
Unless you have a very old machine, it sounds like something is
Andrew Kelly wrote:
Has anyone had any success in speeding up the mpl imports?
import matplotlib.pyplot as plt
( or from matplotlib.figure import Figure)
takes 6 full seconds to load. That seems excessive. Any ideas?
-Andy
Andy,
A couple replies came back directly to me (probably
Eric,
I am running it on a windows 7 machine and a windows XP machine. Odd that
it does this only on win32.
-Andy
On Thu, Apr 1, 2010 at 4:17 PM, Eric Firing efir...@hawaii.edu wrote:
Andrew Kelly wrote:
Has anyone had any success in speeding up the mpl imports?
import matplotlib.pyplot
On Thu, Apr 1, 2010 at 7:17 PM, Eric Firing efir...@hawaii.edu wrote:
Andrew Kelly wrote:
Has anyone had any success in speeding up the mpl imports?
import matplotlib.pyplot as plt
( or from matplotlib.figure import Figure)
takes 6 full seconds to load. That seems excessive. Any ideas?
On Thu, Apr 1, 2010 at 7:57 PM, C M cmpyt...@gmail.com wrote:
On Thu, Apr 1, 2010 at 7:17 PM, Eric Firing efir...@hawaii.edu wrote:
Andrew Kelly wrote:
Has anyone had any success in speeding up the mpl imports?
import matplotlib.pyplot as plt
( or from matplotlib.figure import Figure)
15 matches
Mail list logo