Jason R. Coombs wrote: > >> -----Original Message----- >> From: Darren Dale [mailto:dsdal...@gmail.com] >> >> On Thu, Aug 13, 2009 at 7:44 AM, John Hunter<jdh2...@gmail.com> wrote: >>> On Wed, Aug 12, 2009 at 7:12 AM, John Hunter<jdh2...@gmail.com> >> wrote: >> I appreciate how much time has gone into the patch, but this impacts >> so much code I think it is important to really nail the >> implementation. > > Agreed > >> I think everything should be rolled up into a single >> high level decorator if possible. > > While I think this approach is useful for readability where a pattern is seen > repeated, trying to implement every matplotlib docstring manipulation into a > single, monolithic decorator has the potential to become messy. This is why > I've chosen to implement the same functionality in various components that > can > (and should in some cases) be assembled into a single construct.
[...] > From that, high-level decorators could be assembled with the appropriate > dedent behavior included as well. Jason, John, Darren, I am jumping in late, and with only superficial comments for the moment, at least. After scanning the latest patch and reading the emails up to this point, here are my reactions: 1) In general I like Jason's latest patch. It looks readable, flexible, and testable--but I haven't done any testing yet myself. I find the arguments in this email to which I am replying to be convincing, so I am in favor of Jason's modular approach rather than the monolithic alternative, to the extent that I understand both. 2) Question: how does this relate to all the work that Jouni did recently to fix pyplot docstrings? 3) Question: how does this affect startup time? Jouni tested two approaches to his work, and the decorator approach was significantly slower. I think that for many mpl applications (not to mention running backend_driver.py, which is already getting so slow as to deter its frequent use), startup time really matters. At one point, dedent was accounting for something like 30% of the overhead. Mike's optimization knocked it back to a tolerable level. (Avoiding dedent by keeping docstrings slid to the left in the source is not acceptable--it makes the source horrible to read.) Ideally, all the docstring manipulations would be done once at the time of installation or of compilation to .pyc, not at every mpl startup. I think that doing it at compilation time is impossible, given python's fundamental design, so that leaves the installation time alternative. I don't have any more specific ideas at this point, though. If it turns out that the decorators don't add significantly to the startup time, then the question of alternatives is moot. Eric ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel