On Wed, Jul 1, 2009 at 8:05 PM, John Hampton<[email protected]> wrote:
>
> Shane Caraveo wrote:
>> I've been running through a lot of code looking at performance issues
>> lately, and am wondering if there is a general document for plugin
>> authors that highlights potential/common performance problems and how to
>> avoid them.  I'm not sure if I'm rediscovering common knowledge or not :)
>
> I don't believe that there is a document that contains that info.  Other
> than code, there isn't a huge exhaustive document on plugin development
>
>>  From what I've seen so far, IRequestHandler.match_request and
>> ITemplateStreamFilter.filter_stream are two area's where performance can
>> (and is) hurt by plugins doing more than they should.  I'm not certain
>> the issue is those mechanisms specifically, but rather how they get
>> used.  Just one example, not picking on anyone as I have several
>> examples, the timing and estimation plugin is a major user of stream
>> filters, and in some cases more than doubled the request times.
>
> So, not quite sure what one would be doing in match_request to make it
> take a long time (permission checks, perhaps?), but StreamFilters will
> definitely affect performance, as you have discovered.  This is due to
> genshi.  I know that some work was done on making some speed
> improvements in this areas (or maybe it was just template includes).
> However, it's just an expensive process.

Though if handled with care, template stream filters shouldn't kill
you *that* much.  Our batch ticket update plugin, for example, does
quite a number of transformations on report and query pages. But even
on very large reports with pagination turned off it usually only takes
an additional fraction of a second, at least on my development
workstation.  Yes it slows things down, but I guess cases such as
large reports are already slow enough anyways that the extra penalty
isn't noticed ^^;

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to