Merge lp://qastaging/~edwin-grubbs/launchpad/bug-490659-series-timeout-part2 into lp://qastaging/launchpad/db-devel

Proposed by Edwin Grubbs
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 9734
Proposed branch: lp://qastaging/~edwin-grubbs/launchpad/bug-490659-series-timeout-part2
Merge into: lp://qastaging/launchpad/db-devel
Diff against target: 288 lines (+120/-13)
10 files modified
lib/lp/registry/browser/distroseries.py (+4/-0)
lib/lp/registry/browser/productseries.py (+6/-1)
lib/lp/registry/browser/tests/test_series_views.py (+42/-4)
lib/lp/registry/interfaces/product.py (+4/-1)
lib/lp/registry/interfaces/productseries.py (+4/-1)
lib/lp/registry/model/milestone.py (+5/-2)
lib/lp/registry/model/productseries.py (+4/-1)
lib/lp/registry/templates/productseries-milestone-table-row.pt (+1/-1)
lib/lp/registry/templates/productseries-table-releases.pt (+6/-2)
lib/lp/registry/tests/test_product.py (+44/-0)
To merge this branch: bzr merge lp://qastaging/~edwin-grubbs/launchpad/bug-490659-series-timeout-part2
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+34159@code.qastaging.launchpad.net

Description of the change

Summary
-------

This branch is dependent on the milestone_sort_key() db function that
was recently landed on db-devel. The milestones/releases for a series
are now batched. I also limited the number of milestones/releases
displayed in the timeline graph.

Implementation details
----------------------

Added batching:
    lib/lp/registry/browser/distroseries.py
    lib/lp/registry/browser/productseries.py
    lib/lp/registry/browser/tests/test_distroseries_views.py
    lib/lp/registry/browser/tests/test_productseries_views.py
    lib/lp/registry/model/milestone.py
    lib/lp/registry/templates/productseries-table-releases.pt

Limited the number of milestones/releases displayed in the timeline
graph.
    lib/lp/registry/interfaces/product.py
    lib/lp/registry/interfaces/productseries.py
    lib/lp/registry/model/productseries.py
    lib/lp/registry/tests/test_product.py

The cache TALes needs the third argument to ensure that it retrieves the
right cached value for a block in a loop.
    lib/lp/registry/templates/productseries-milestone-table-row.pt

Tests
-----

$ ./bin/test --list-tests -vv -t 'test_(distro|product)series_views|registry\.tests\.test_product\.'

Demo and Q/A
------------

* Open http://launchpad.dev/firefox/trunk

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

A meta-question; is batching here needed? I'm surprised we have enough
data that its a problem (or put another way, whats the scaling factors
at play here; how can we be sure batching will fix the issue).

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

> A meta-question; is batching here needed? I'm surprised we have enough
> data that its a problem (or put another way, whats the scaling factors
> at play here; how can we be sure batching will fix the issue).

The libpng project has 777 releases on a single series. This is caused by the Release URL Pattern on the "main" series which automatically downloads new versions of libpng tarballs and creates a revision to hold the file.

Even projects that don't have that many milestones or releases may have problems displaying all of them since each milestone will display stats on how many bugs and blueprints are assigned to it.

Revision history for this message
Graham Binns (gmb) wrote :

<gmb> EdwinGrubbs, Those two tests are *awfully* similar. Any chance they could be unified in their own TestCase (e.g. TestFooBatchNavigators)
<EdwinGrubbs> gmb: sure
<gmb> EdwinGrubbs, Cool.
 EdwinGrubbs, Other than that, r=me.

review: Approve (code)
Revision history for this message
Robert Collins (lifeless) wrote :

On Wed, Sep 1, 2010 at 2:41 AM, Edwin Grubbs <email address hidden> wrote:

> The libpng project has 777 releases on a single series. This is caused by the Release URL Pattern on the "main" series which automatically downloads new versions of libpng tarballs and creates a revision to hold the file.
>
> Even projects that don't have that many milestones or releases may have problems displaying all of them since each milestone will display stats on how many bugs and blueprints are assigned to it.

Wow. We should be able to make the stats display reasonably fast;
might want to consider tuning the batch size up a bit if we can, e.g.
to 24 (2 years of monthly releases).

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

On Tue, Aug 31, 2010 at 4:28 PM, Robert Collins
<email address hidden> wrote:
> On Wed, Sep 1, 2010 at 2:41 AM, Edwin Grubbs <email address hidden> wrote:
>
>> The libpng project has 777 releases on a single series. This is caused by the Release URL Pattern on the "main" series which automatically downloads new versions of libpng tarballs and creates a revision to hold the file.
>>
>> Even projects that don't have that many milestones or releases may have problems displaying all of them since each milestone will display stats on how many bugs and blueprints are assigned to it.
>
> Wow. We should be able to make the stats display reasonably fast;
> might want to consider tuning the batch size up a bit if we can, e.g.
> to 24 (2 years of monthly releases).

The default batch size on launchpad.dev is 5, but the default batch
size on production is 50. This default is part of the BatchNavigator,
so it doesn't just apply to this page.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: