Merge lp:~rvb/launchpad/activereviews-bug-867941-hugequery into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14355 | ||||
Proposed branch: | lp:~rvb/launchpad/activereviews-bug-867941-hugequery | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
194 lines (+78/-23) 1 file modified
lib/lp/code/model/branchcollection.py (+78/-23) |
||||
To merge this branch: | bzr merge lp:~rvb/launchpad/activereviews-bug-867941-hugequery | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+82650@code.launchpad.net |
Commit message
[incr] [r=adeuring][bug=867941] Refactor the huge query issued by activereviews to use a CTE.
Description of the change
= Summary =
This branch aims to improve the performance of code.lp.
= Details =
The main change here is the refactoring of _getBranchVisib
Another trick is that getMergeProposa
= Tests =
I admit I've not created any test for this even if I've tested it manually to make sure that the query issued is of the right form. I don't think a test to assert that the query is of the right form would be appropriate but maybe a reviewer will have an better idea.
= Q/A =
This branch should not change the behavior of the +activereview page but it's important to make sure that this really improves the performance before we release it.
Here are a few numbers on how the huge original query performs:
qastaging: [1860.0, 6737.0, 1846.0, 1953.0, 1860.0, 1677.0, 1734.0, 2161.0, 2087.0, 1948.0, 2007.0, 1750.0]
prod: [4517.0, 4786.0, 4786.0, 4517.0, 4502.0, 4502.0, 4502.0, 4350.0]
very nice!