Merge lp:~edwin-grubbs/launchpad/bug-663861-product-series-timeout-part2 into lp:launchpad/db-devel
Status: | Merged |
---|---|
Approved by: | Edwin Grubbs |
Approved revision: | no longer in the source branch. |
Merged at revision: | 9939 |
Proposed branch: | lp:~edwin-grubbs/launchpad/bug-663861-product-series-timeout-part2 |
Merge into: | lp:launchpad/db-devel |
Prerequisite: | lp:~edwin-grubbs/launchpad/bug-663861-product-series-timeout-part1 |
Diff against target: |
361 lines (+150/-33) 9 files modified
database/schema/trusted.sql (+6/-2) lib/lp/registry/browser/configure.zcml (+1/-1) lib/lp/registry/browser/product.py (+32/-16) lib/lp/registry/browser/tests/product-files-views.txt (+3/-2) lib/lp/registry/browser/tests/product-views.txt (+21/-0) lib/lp/registry/interfaces/product.py (+10/-0) lib/lp/registry/model/product.py (+25/-0) lib/lp/registry/templates/product-series.pt (+21/-11) lib/lp/registry/tests/test_product.py (+31/-1) |
To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-663861-product-series-timeout-part2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop (community) | db | Approve | |
Abel Deuring (community) | code | Approve | |
Robert Collins | db | Pending | |
Review via email: mp+39643@code.launchpad.net |
Commit message
Batch results on $product/+series page to fix timeout.
Description of the change
Summary
-------
In a prerequisite branch, I added the functional index, but I
had to make a slight change to it to move the numbered versions
to the top, so I will also need a db review again.
The python sort method orders them as
[devfocus, 3, 2a, 2b, 1, a, b, c], but it makes more sense to order it
as [devfocus, 3, 2b, 2a, 1, c, b, a].
The branch fixes a timeout on the $product/+series page by batching the
results.
Implementation details
-------
When sorting descending, move the numbered versions above the letters.
database/
Changed the product.
to avoid confusion with productseries.
lib/
Added the getVersionSorte
ProductSeriesSe
The template needs the css_class attribute in the decorated series, but
I didn't want to worry about SeriesWithRelea
populated, even though I don't think the template uses it. Therefore, I
split css_class into the DecoratedSeries class.
lib/
lib/
lib/
lib/
lib/
lib/
Fixed lint error and removed reference to the series attribute inside
the decorated series, since the `name` can be retrieved from the
decorated series.
lib/
Tests
-----
./bin/test -vv -t 'test_product|
Demo and Q/A
------------
* Open http://
* It should not timeout, and the results should be batched.
(The timeline graph might still timeout.)
Hi Ediwn,
a nice branch! I just wondered if it makes sense to add comment to substitue_ filled_ numbers( ) explaining that '~' > c is always true, where c is any character that can appear in a series name.