On Fri, Aug 9, 2013 at 11:15 AM, Martin Mokrejs <mmokr...@fold.natur.cuni.cz
> 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 our codebase. Does get_aliases()
really get called that often?  If so, I doubt changes with regards to
startwith() is the best use of our time.  I would imagine that a refactor
that caches possible aliases. Hell, I would just as soon like to see the
entire aliases framework ripped out and redone more correctly in the first
place.

As for the other startswith() changes, there are some subtle differences in
the change that has to be considered. First, is there a guarantee that the
string being indexed is not empty? startswith() would handle that
correctly, while indexing would throw an exception (and setting up code to
try...catch those exceptions would reduce readability and probably reduce
performance back to where we started).

I think that the *biggest* improvement we are going to get is from your
patch to figure.py because it touches on some very deep code that is
executed very frequently, and we were doing in probably the most
inefficient manner.

Again, I really stress the importance of setting up a github account and
submitting a PR. Once you do that, you are all set to go for contributing
to many other great projects (numpy, scipy, ipython, etc.).

Cheers!
Ben Root
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to