SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S
1
(3)
2
(7)
3
(5)
4
(1)
5
(36)
6
(36)
7
8
(7)
9
(23)
10
(24)
11
(6)
12
(16)
13
(34)
14
(5)
15
16
(34)
17
(25)
18
(13)
19
(26)
20
(64)
21
(26)
22
(20)
23
(10)
24
(24)
25
(23)
26
(13)
27
(15)
28
(1)
29
(4)
30
(9)
31
(9)




Showing 9 results of 9

From: Darren D. <dd...@co...> - 2007年07月31日 21:04:55
On Tuesday 31 July 2007 02:12:06 pm you wrote:
> Looking at the profile outputs, a couple of things stand out in the new
> version. =A0First, various Traits things are prominent near the top.
pycachegrind is telling me that traits_db is responsible for about 20%,=20
configobj is responsible for about 30%, and the config package another 30%.
> Second, look at the lines for posixpath functions, which are taking
> quite a bit of time. =A0Here are two examples:
>
> =A0 =A0 =A0 5651 =A0 =A00.108 =A0 =A00.000 =A0 =A00.188 =A0 =A00.000 posi=
xpath.py:56(join)
> [...]
> =A0 =A0 =A0 =A0273 =A0 =A00.012 =A0 =A00.000 =A0 =A00.164 =A0 =A00.001 po=
sixpath.py:410(realpath)
>
> If I understand correctly, path.join is being called 5651 times! =A0And
> realpath is being called 273 times! =A0
I think the posix_path stuff is being called most often by python while it=
=20
attempts to locate modules.=20
[...]
> I would not like to see mpl become a library that is painfully sluggish
> to start up; it is already too slow for my liking, with font setup being
> a major contributor.
I agree.
Darren
From: Fernando P. <fpe...@gm...> - 2007年07月31日 20:11:05
On 7/31/07, Michael Droettboom <md...@st...> wrote:
> Eric Firing wrote:
> > I don't have a lot of experience with profiling...
> Slightly OT, but I do have a recommendation for anyone doing Python
> profiling. I don't usually get very excited about GUI tools, but
> KCachegrind (Linux only) is very slick and works great with Python.
> It's really handy to be able to "browse" the calltree interactively to
> explore what's going on.
>
> The trick (which is very non-obvious from the documentation), is that
> you use Python's 'hotspot' profiler, then convert that to 'calltree'
> format using hotspot2calltree (included with KCachegrind), and then load
> that with KCachegrind.
>
> Just my two cents for something you may want to try,
Yup. The link I posted earlier is basically a little wrapper that
does all that. I wrote it so you wouldn't have to think :)
I keep it in my path and can profile any python script with
kcachegrind just by running one command. And yes, kcachegrind rocks.
I'm also very much a non-gui person, yet I've found it invaluable for
doing really complex profiling of very large python codes.
Cheers,
f
From: Michael D. <md...@st...> - 2007年07月31日 20:05:29
Eric Firing wrote:
> I don't have a lot of experience with profiling...
Slightly OT, but I do have a recommendation for anyone doing Python 
profiling. I don't usually get very excited about GUI tools, but 
KCachegrind (Linux only) is very slick and works great with Python. 
It's really handy to be able to "browse" the calltree interactively to 
explore what's going on.
The trick (which is very non-obvious from the documentation), is that 
you use Python's 'hotspot' profiler, then convert that to 'calltree' 
format using hotspot2calltree (included with KCachegrind), and then load 
that with KCachegrind.
Just my two cents for something you may want to try,
Mike
From: Eric F. <ef...@ha...> - 2007年07月31日 18:12:28
Darren,
The two cases you ran have almost identical timing, so the problem is 
not in reading matplotlib.conf. Instead, it seems to be in the 
initialization of all the machinery, and I suspect that something may 
be getting run many times in a loop instead of just once. I used the 
profile.py script method to profile the whole simple_plot.py demo 
modified to use Agg, with NEWCONFIG True versus False. Attached are the 
top 100 lines of the output, sorted by cumulative time, with "new" 
meaning NEWCONFIG=True. The execution time of the new version is 3.2 
seconds versus 1.8 for the old. (Both are pretty slow for making a 
minimal plot from a script.)
Looking at the profile outputs, a couple of things stand out in the new 
version. First, various Traits things are prominent near the top. 
Second, look at the lines for posixpath functions, which are taking 
quite a bit of time. Here are two examples:
 5651 0.108 0.000 0.188 0.000 posixpath.py:56(join)
[...]
 273 0.012 0.000 0.164 0.001 posixpath.py:410(realpath)
If I understand correctly, path.join is being called 5651 times! And 
realpath is being called 273 times! Now, these calls are contributing 
only a little to the total time difference between the mpl versions, but 
they may be providing clues as to what is wrong. My guess is that there 
is a glitch in the program logic that is causing some operations that 
should be done once or a few times to be done hundreds or thousands of 
times, and this will turn out to be the biggest factor in the slowdown. 
 If so, then we will still have to see whether a significant slowdown 
remains after the glitch is corrected.
I don't have a lot of experience with profiling, but it seems to me that 
ordering results by cumulative time is good for finding the major 
operations that are slow, whereas ordering by time is good for finding 
the lowest-level functions that are holding things up. Ordering by time 
shows these as the top two for the new system:
32581/31616 0.152 0.000 0.168 0.000 :0(len)
 98 0.132 0.001 0.372 0.004 has_traits.py:558(__init__)
This doesn't mean that the len builtin is too slow, but that it is 
getting called a lot of times, and we have to look elsewhere to figure 
out how to reduce that, if possible. The second line, however, suggests 
to me that even after the glitch problem is solved, we will be stuck 
with a distressing startup overhead from using traits. This line is 
saying that we are initializing 98 trait instances, and this 
initialization alone is taking 0.37 seconds, of which 0.13 seconds is in 
the init code, not in functions that it is calling. If you look at the 
code for that __init__, you will see that it is huge. It may be that 
the traits overhead is small once a program is up and running, but it 
certainly looks to me like the startup overhead is a killer if more than 
a few traits are to be used.
I would not like to see mpl become a library that is painfully sluggish 
to start up; it is already too slow for my liking, with font setup being 
a major contributor.
Eric
Darren Dale wrote:
> On Monday 30 July 2007 07:10:01 pm Eric Firing wrote:
>> Darren Dale wrote:
>>> I just committed changes in svn that will allow matplotlib to use the
>>> experimental traited mplconfig module. The traited config object itself
>>> is called mplConfig, but I wrapped it in an object called rcParams to
>>> make it compatible with matplotlib, so we can kick the tires without
>>> extensive changes.
>> Darren,
>>
>> There is *major* speed problem. Running "backend_driver.py Template":
>>
>> 0.95 minutes with NEWCONFIG = True
>> 0.51 minutes False
> 
> I used the following script in the matplotlib/config directory to profile the 
> mplconfig module:
> def main():
> import mplconfig
> 
> if __name__=='__main__':
> import profile
> import pstats
> profile.run('main()', 'config.prof')
> 
> p = pstats.Stats('config.prof')
> p.sort_stats('cumulative').print_stats(55)
> 
> I am attaching the results for two different tests. One is loading the default 
> mpl-data/matplotlib.conf, the other is loading an empty 
> ~/.matplotlib/matplotlib.conf. I haven't done much work with profiling, maybe 
> others can make some comments about the results.
From: Fernando P. <fpe...@gm...> - 2007年07月31日 15:33:43
On 7/31/07, Darren Dale <dd...@co...> wrote:
> I am attaching the results for two different tests. One is loading the default
> mpl-data/matplotlib.conf, the other is loading an empty
> ~/.matplotlib/matplotlib.conf. I haven't done much work with profiling, maybe
> others can make some comments about the results.
I'm afraid I can't help with this right now, but you may want to look at
http://amath.colorado.edu/faculty/fperez/python/profiling/
the little code I put in there makes using kcachegrind very easy for
python profiling, and it's really a useful tool for analyzing
profiling info.
Cheers,
f
From: Darren D. <dd...@co...> - 2007年07月31日 15:06:38
On Tuesday 31 July 2007 11:08:42 am Darren Dale wrote:
> On Monday 30 July 2007 07:10:01 pm Eric Firing wrote:
> > Darren Dale wrote:
> > > I just committed changes in svn that will allow matplotlib to use the
> > > experimental traited mplconfig module. The traited config object itself
> > > is called mplConfig, but I wrapped it in an object called rcParams to
> > > make it compatible with matplotlib, so we can kick the tires without
> > > extensive changes.
> >
> > Darren,
> >
> > There is *major* speed problem. Running "backend_driver.py Template":
> >
> > 0.95 minutes with NEWCONFIG = True
> > 0.51 minutes False
>
> I used the following script in the matplotlib/config directory to profile
> the mplconfig module:
> def main():
> import mplconfig
>
> if __name__=='__main__':
> import profile
> import pstats
> profile.run('main()', 'config.prof')
>
> p = pstats.Stats('config.prof')
> p.sort_stats('cumulative').print_stats(55)
sorry, that should say 'time' instead of 'cumulative'
> I am attaching the results for two different tests. One is loading the
> default mpl-data/matplotlib.conf, the other is loading an empty
> ~/.matplotlib/matplotlib.conf. I haven't done much work with profiling,
> maybe others can make some comments about the results.
From: Darren D. <dd...@co...> - 2007年07月31日 15:03:47
On Monday 30 July 2007 07:10:01 pm Eric Firing wrote:
> Darren Dale wrote:
> > I just committed changes in svn that will allow matplotlib to use the
> > experimental traited mplconfig module. The traited config object itself
> > is called mplConfig, but I wrapped it in an object called rcParams to
> > make it compatible with matplotlib, so we can kick the tires without
> > extensive changes.
>
> Darren,
>
> There is *major* speed problem. Running "backend_driver.py Template":
>
> 0.95 minutes with NEWCONFIG = True
> 0.51 minutes False
I used the following script in the matplotlib/config directory to profile the 
mplconfig module:
def main():
 import mplconfig
if __name__=='__main__':
 import profile
 import pstats
 profile.run('main()', 'config.prof')
 
 p = pstats.Stats('config.prof')
 p.sort_stats('cumulative').print_stats(55)
I am attaching the results for two different tests. One is loading the default 
mpl-data/matplotlib.conf, the other is loading an empty 
~/.matplotlib/matplotlib.conf. I haven't done much work with profiling, maybe 
others can make some comments about the results.
From: Darren D. <dd...@co...> - 2007年07月31日 14:09:55
Hi Eric,
On Monday 30 July 2007 10:14:22 pm Eric Firing wrote:
> I have not made any matplotlib.conf other than the one that is now being
> installed correctly in mpl-data, and it contains
>
> # display grid on regular or polar axes
> grid = False
> polargrid = True
>
> grep indicates the True value is coming from mplconfig:
>
> config/mplconfig.py: grid = T.Trait(True, mplT.BoolHandler())
>
> config/rcsetup.py: 'axes.grid' : [False, validate_bool]
>
> so it looks like somehow this mplconfig initialization is overriding the
> value in matplotlib.conf.
Ok, sorry for the confusion. There were two problems: 
-The .conf file in mpl-data was not being read. It is fixed in svn 3645.
-The .conf file is not auto-generated by setup.py. This is a more difficult 
problem, so I am not going to work on it unless we decide to adopt the new 
module. In the mean time, the file can be auto-generated by running 
mplconfig.
Darren
From: Eric F. <ef...@ha...> - 2007年07月31日 02:14:45
Darren Dale wrote:
> On Monday 30 July 2007 6:58:17 pm Eric Firing wrote:
>> Darren,
>>
>> It looks like there is a problem with the grid lines. Although the
>> matplotlib.conf file is specifying linestyle = ':', and False for the
>> axes.grid parameter, everything is coming up with solid lines (see
>> barh_demo.py, for example) by default. It looks like those two keys are
>> not setting their respective rcParams entries.
> 
> barh_demo turns the grid on. I accidentally set the default linestyle to '-' 
> in mplconfig for the grids, thats been fixed.
Darren,
barh_demo turns the grid on for the first plot only, but the grid is 
shown for both. ipython -pylab also plots with a grid by default, and 
shows
In [3]:rcParams['axes.grid']
Out[3]:True
I have not made any matplotlib.conf other than the one that is now being 
installed correctly in mpl-data, and it contains
 # display grid on regular or polar axes
 grid = False
 polargrid = True
grep indicates the True value is coming from mplconfig:
config/mplconfig.py: grid = T.Trait(True, mplT.BoolHandler())
config/rcsetup.py: 'axes.grid' : [False, validate_bool]
so it looks like somehow this mplconfig initialization is overriding the 
value in matplotlib.conf.
Eric

Showing 9 results of 9

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /