Merge lp:~rvb/launchpad/activereviews-bug-867941-eagerload2 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 14366 | ||||
Proposed branch: | lp:~rvb/launchpad/activereviews-bug-867941-eagerload2 | ||||
Merge into: | lp:launchpad | ||||
Prerequisite: | lp:~rvb/launchpad/activereviews-bug-867941-hugequery | ||||
Diff against target: |
160 lines (+55/-18) 4 files modified
lib/lp/code/browser/tests/test_branchmergeproposallisting.py (+15/-8) lib/lp/code/model/branchcollection.py (+15/-6) lib/lp/code/model/diff.py (+21/-1) lib/lp/testing/factory.py (+4/-3) |
||||
To merge this branch: | bzr merge lp:~rvb/launchpad/activereviews-bug-867941-eagerload2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+82904@code.launchpad.net |
Commit message
[r=allenap][bug=867941] Eager load objects related to BMPs.
Description of the change
This branch eager loads more stuff to bring down the number of queries issued by person:
= Tests =
./bin/test -vvc test_branchmerg
= Q/A =
The goal of this change is to reduce the number of queries issued by person:
qastaging: [678+, 807+, 1068+, 939+, 1056+, 1140+]
prod: [1405, 849+, 777+, 1034+, 639+, 1382+]
(a '+' next to the number means that the whole page timed out and thus the number of queries is not accurate)
That remaining query just needs a bit more cachedproperty love - see for instance BranchCollection which does the same trick with backreferences elsewhere in the branch space.