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 sufficient to write out a file called "import.prof": python.exe -c "import cProfile; prof=cProfile.Profile(); prof.run('import pylab', 'import.prof')" Mike C M 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") >>> >>> takes 6 full seconds to load. That seems excessive. Any ideas? >>> >>> -Andy >>> >> Andy, >> >> A couple replies came back directly to me (probably intended for the >> list, though), and both reported results similar to yours, on Windows >> machines only. What OS and version are you running? >> > > Sorry Eric, that was indeed intended for the list. Just for the > list's sake, I'll repeat it: > > It takes longer than any other Python module for me, too, about 5-6 > seconds on a "cold" load (on Windows), though faster on a "warm" load. > I am running it locally on a laptop that is 1.7 GHz Intel Pentium > laptop with 1Meg RAM. > > And I should add: I don't currently have Linux installed, but will > soon again I hope, and I will take note of how long it takes on Linux. > > Thanks, > Che > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users