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. > If there is not such a document, I think it would be useful to try and > get one together. I'd be happy to help with the area's I've figured > out, but someone with longer experience working with genshi and trac > internals should, at a minimum, validate the information. I think Noah probably has the best grasp of the performance bottlenecks. I agree that it would be worth while getting some "best practices" together for plugin developers. -John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
