TranslationGroup:+index slow 1-2% of requests timing out
Bug #618393 reported by
Robert Collins
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Jeroen T. Vermeulen |
Bug Description
TranslationGrou
This isn't a terrible issue, but the distribution is pretty wide - we can expect this page to continually give us trouble as we lower timeouts, unless we can make it consistently fast.
Related branches
lp://qastaging/~jtv/launchpad/bug-618393
- Henning Eggers (community): Approve (code)
-
Diff: 804 lines (+361/-103)10 files modifiedlib/lp/registry/model/pillar.py (+7/-27)
lib/lp/registry/model/product.py (+49/-5)
lib/lp/registry/tests/test_productwithlicenses.py (+114/-0)
lib/lp/translations/browser/tests/test_translationgroup.py (+2/-6)
lib/lp/translations/browser/translationgroup.py (+4/-3)
lib/lp/translations/doc/translationgroup.txt (+9/-7)
lib/lp/translations/interfaces/translationgroup.py (+28/-2)
lib/lp/translations/model/translationgroup.py (+114/-21)
lib/lp/translations/templates/translationgroup-index.pt (+17/-16)
lib/lp/translations/templates/translationgroup-portlet-projects.pt (+17/-16)
Changed in rosetta: | |
status: | Triaged → In Progress |
assignee: | nobody → Jeroen T. Vermeulen (jtv) |
milestone: | none → 10.10 |
Changed in rosetta: | |
milestone: | 10.10 → 10.09 |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in rosetta: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.