Merge lp:~sinzui/launchpad/timeout-portlet-package-summary-2 into lp:launchpad
Proposed by
Curtis Hovey
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/timeout-portlet-package-summary-2 |
Merge into: | lp:launchpad |
Diff against target: |
86 lines (+14/-19) 3 files modified
lib/lp/registry/browser/distroseries.py (+6/-9) lib/lp/registry/stories/distroseries/xx-distroseries-index.txt (+6/-6) lib/lp/registry/templates/distroseries-portlet-packaging.pt (+2/-4) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/timeout-portlet-package-summary-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+20228@code.launchpad.net |
To post a comment you must log in.
This is my branch to guarantee that the distroseries page does not
timeout.
lp:~sinzui/launchpad/timeout-portlet-package-summary-2 /bugs.launchpad .net/bugs/ 526583 -index implementation: no one
Diff size: 88
Launchpad bug: https:/
Test command: ./bin/test -vv -t xx-distroseries
Pre-
Target release: 10.02
Guarantee that the distroseries page does not timeout ------- ------- ------- ------- ------- ------- ----
-------
+portlet- package- summary still causes timeouts after SQL tuning. Take
drastic measures like removing content to avoid making SQL calls that
are to expensive.
Rules
-----
* Remove the list of packages that most need linking. nlinkedSourcePa ckages( ) that unlinked_ packages. The number of packages
* Factor out calls to getPrioritizedU
are used by view.num_
that
need linking can be derived from the total source packages minus
the number of linked packages.
* /me thinks the number of packages that need linking as
calculated
now is wrong. It is too high and anyone looking at the numbers
in
the page can work that out. 16829 - 1498 = 15331, not 15414. I
suspect the difference is unpublished packages in the series.
QA
--
* Visit https:/ /edge.launchpad .net/ubuntu/ lucid
* Reload the page 10 times and do not see a timeout.
Lint
----
Linting changed files: registry/ browser/ distroseries. py registry/ stories/ distroseries/ xx-distroseries -index. txt registry/ templates/ distroseries- portlet- packaging. pt
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/lp/ registry/ stories/ distroseries/ xx-distroseries -index. txt sourcecounts in sampledata. I
* Updated the test to show that packages that most need linking
are
not listed.
* Update the test to show the insane -2 packages need linking.
This
is caused by stale distroseries.
decided to not force the number to be sane so that anyone
looking
at the page in dev will see a test explaining why the number is
wrong.
Implementation
--------------
* lib/lp/ registry/ browser/ distroseries. py packages to use the fast and logical way to nlinkedSourcePa ckages after this release. registry/ templates/ distroseries- portlet- packaging. pt
getPrioritized UnlinkedSourceP ackages.
* Updated num_unlinked_
learn the number: total source packages - number of packagings.
* Inlined _unlinked_packages to the only method that needs to use
the expensive query. The template does not call this method. We
will
work on getPrioritizedU
* lib/lp/
* Removed the needs linking section to avoid calling