Merge lp:~wgrant/launchpad/bug-654372-optimise-domination into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Graham Binns on 2010-11-16 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 11931 | ||||
| Proposed branch: | lp:~wgrant/launchpad/bug-654372-optimise-domination | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
143 lines (+59/-47) 1 file modified
lib/lp/archivepublisher/domination.py (+59/-47) |
||||
| To merge this branch: | bzr merge lp:~wgrant/launchpad/bug-654372-optimise-domination | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Graham Binns (community) | code | 2010-11-15 | Approve on 2010-11-16 |
|
Review via email:
|
|||
Commit Message
[r=gmb][ui=none][bug=654372] Optimise source domination down from a few minutes to less than a second.
Description of the Change
= Summary =
The source domination candidate selection process currently takes up to
three minutes per primary series in production. This is roughly 10% of
the total primary archive publisher time.
== Proposed fix ==
Binary domination has an optimisation which cuts it from minutes to less
than a second: it first calculates the set of names which have multiple
active publications and then considers only the publications matching
those names. The obvious fix is to extend this technique to cover source
domination too.
== Pre-implementation notes ==
None. This is just a cleanup of the binary candidate selection approach
and an extension of it to sources.
== Implementation details ==
The existing approach uses a temporary table and string-based SQL
queries. I've revised it to use Storm syntax and a subselect instead.
== Tests ==
This is just about impossible to test -- query counts should be
similar, but they'll be much faster.
lp.archivepubli
for this area.
== Demo and Q/A ==
The tests are reasonably good now, so should catch any regressions. We
may see the dogfood publisher become a few minutes faster.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
