Merge lp:~gmb/launchpad/fix-b.l.n-timeouts-bug-517798 into lp:launchpad
Proposed by
Graham Binns
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~gmb/launchpad/fix-b.l.n-timeouts-bug-517798 |
Merge into: | lp:launchpad |
Diff against target: |
47 lines (+14/-14) 2 files modified
lib/canonical/launchpad/systemhomes.py (+1/-1) lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt (+13/-13) |
To merge this branch: | bzr merge lp:~gmb/launchpad/fix-b.l.n-timeouts-bug-517798 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Canonical Launchpad Engineering | code | Pending | |
Review via email: mp+18866@code.launchpad.net |
Commit message
Fix the timeouts caused by inefficient and unnecessary sorting on the Malone frontpage.
To post a comment you must log in.
This branch fixes the timeouts on the Malone front page (see bug 517798). The timeouts were caused because we were (unnecessarily) ordering the results of the latest bugs query by (datecreated, id). Since this combination has no index it took far longer to order the result set than by just using datecreated, even though the results were the same (because datecreated and id advance together; it's very rare that two bugs have the same datecreated and even if they do we don't care all that much for the sake of the list of latest bugs).
The fix for this is to remove 'id' from the orderBy clause of the offending query. I've updated the pagetest for the Malone frontpage, which was the only test affected by this change.
This fix has already been cowboyed to production and edge; it needs to land on devel so that it will be rolled out without edge breaking again.