[Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
[re-sending with also the 3rd patch file, sorry] Hi, I am drawing some barcharts and scatter plot and the speed for rendering is awful once you have 100 000 of dots. I ran python profiler which lead me to .startswith() calls and some for loops which append do a list repeatedly. This parts coul

[Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
Hi, I am drawing some barcharts and scatter plot and the speed for rendering is awful once you have 100 000 of dots. I ran python profiler which lead me to .startswith() calls and some for loops which append do a list repeatedly. This parts could be still sped up I think but a first attempt is

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Phil Elson
Hi Martin, Thanks for this - we are really interested in speeding up the scatter and barchart plotting with large data sets. In fact, we've done some work ( https://github.com/matplotlib/matplotlib/pull/2156) recently to make the situation better. I'd really like to review these changes (against

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
Hi Phil, Phil Elson wrote: > Hi Martin, > > Thanks for this - we are really interested in speeding up the scatter and > barchart plotting with large data sets. In fact, we've done some work > (https://github.com/matplotlib/matplotlib/pull/2156) recently to make the > situation better. > > I'd

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Benjamin Root
On Fri, Aug 9, 2013 at 9:04 AM, Martin Mokrejs wrote: > Hi Phil, > > Phil Elson wrote: > > Hi Martin, > > > > Thanks for this - we are really interested in speeding up the scatter > and barchart plotting with large data sets. In fact, we've done some work ( > https://github.com/matplotlib/matplotl

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
Hi Ben, thank your for your comments. OK, here are revised patches. I see a hot spot in artist.py where the getattr() calls are too expensive. Actually, those under the callable() path. 793 class ArtistInspector: 817 def get_aliases(self): 818 """ 819 Get a dict mapping

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Benjamin Root
On Fri, Aug 9, 2013 at 11:15 AM, Martin Mokrejs wrote: > Hi Ben, > thank your for your comments. OK, here are revised patches. I see a hot > spot > in artist.py where the getattr() calls are too expensive. Actually, those > under > the callable() path. > > Ah, yes... one of the biggest warts in