Merge lp:~jtv/launchpad/bug-327575 into lp:launchpad
Proposed by
Jeroen T. Vermeulen
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jeroen T. Vermeulen | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~jtv/launchpad/bug-327575 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
321 lines (+173/-34) 6 files modified
lib/lp/translations/browser/tests/test_translationgroup.py (+69/-0) lib/lp/translations/browser/translationgroup.py (+23/-16) lib/lp/translations/doc/translationgroup.txt (+37/-0) lib/lp/translations/interfaces/translationgroup.py (+14/-4) lib/lp/translations/model/translationgroup.py (+27/-12) lib/lp/translations/templates/translationgroup-index.pt (+3/-2) |
||||
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-327575 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Muharem Hrnjadovic (community) | code | Approve | |
Review via email: mp+20591@code.launchpad.net |
Commit message
Speed up TranslationGrou
To post a comment you must log in.
= Bug 327575 =
We're seeing some timeouts (and a robust ranking in the top-10 query counts) for the TranslationGrou p:+index page.
The culprit seems to be lots of Person queries, which can only be the translation teams in the group. There are also repeated queries for Language.
Here I introduce a view method that batch-fetches this information. It's an ideal candidate for batch-fetching: a simple three-way 1-to-1 join, no repetition whatsoever, no UI batching, and no selectivity beyond the "front gate" of the query.
In other news, the TranslationGrou pView becomes an adopted child of LaunchpadView, and an <img> in the template becomes a sprite.
{{{ pView -t /translationgro up.txt
./bin/test -vv -t TranslationGrou
}}}
Jeroen