Comment 1 for bug 618393

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I spent some time looking at OOPS-1702F648. Most of the time (though not by a very wide margin) goes into database queries. A good portion of those are avoidable:

 * Icons for projects, project groups, and distributions (24% of queries). Easily prejoined.
 * Product licensing status for the Product URL formatter (15% of queries). We could skip that, or use ProductWithLicenses to prejoin.
 * There's a bit of redundant iterate/is-empty querying on the translators. Should be easy to put the horse before the cart.
 * Team membership counts. Would need some extra helpers (useful in many places I imagine) but should be prejoinable.

Finally, the template checks context/required:launchpad.Edit a lot. At least for the TranslationGroup itself, the view could evaluate that once. I don't know if it'll eliminate a lot of queries but it can save time in Zope. It'd be harder to do for the Edit check on individual translators though.