Merge lp:~adeuring/launchpad/bug-607958 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Abel Deuring | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12210 | ||||
Proposed branch: | lp:~adeuring/launchpad/bug-607958 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
153 lines (+69/-44) 2 files modified
lib/lp/bugs/model/bugtask.py (+61/-38) lib/lp/bugs/model/tests/test_bugtask.py (+8/-6) |
||||
To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-607958 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henning Eggers (community) | code | Approve | |
Review via email: mp+45675@code.launchpad.net |
Commit message
[r=henninge]
Description of the change
This branch fixes bug 607958: timeouts on Distribution:
The query to find expirable bugtasks is/was quite slow. An EXPLAIN ANALYZE showed that the sub-query to find all possible bug targets having bug expiration enabled retrieved _all_ bugtargets, even if findExpirableBu
So I added a method _getJoinForTarg
This makes the query twice as a fast as before for findExpriableBu
test: ./bin/test -vvt test_bugtask.
no lint
Thanks for this improvement. I see you also fixed the test to actually do something useful. Good job!
Maybe you could move that SQL comment out into a Python comment? I find it rather unnecessary to have it in the SQL.