launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02824
[Merge] lp:~wallyworld/launchpad/recipe-daily-build-performance-2 into lp:launchpad
The proposal to merge lp:~wallyworld/launchpad/recipe-daily-build-performance-2 into lp:launchpad has been updated.
Description changed to:
A further performance improvement for the +daily-builds page.
== Implementation ==
The page template had tales expressions like:
dailybuild/recipe/fmt:url
dailybuild/recipe/name
This caused the zope security infrastructure to do a permission check when navigating the path expression, which in turn caused getRelatedBranches() on each recipe to be called one by one, which in turn resulted in approx 3 queries per recipe. So the query count was always > 3 * nr recipes and for a batch size of 50, this meant that > 150 queries were executed, adding 4 or 5 seconds to the page render time.
The fix was to provide the required recipe url and name values as properties on the view model objects, removing the trigger for a zope permission check.
This fix will reduce the query count to a fixed count of approx 30-40 instead of approx 190 (for a batch size of 50).
== Lint ==
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/code/configure.zcml
lib/lp/code/browser/tests/test_recipebuildslisting.py
lib/lp/code/model/recipebuild.py
lib/lp/code/templates/daily-builds-listing.pt
For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/recipe-daily-build-performance-2/+merge/51896
--
https://code.launchpad.net/~wallyworld/launchpad/recipe-daily-build-performance-2/+merge/51896
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wallyworld/launchpad/recipe-daily-build-performance-2 into lp:launchpad.
References