The All Recipes page has redundant foreign key table counts, each of which are very expensive and causes the page to load slowly.
The simple solution from Dave Lerner is to use the "with" keyword to only calculate these values once per page, for example: {% with deps=recipe.r_dependencies_recipe.all %} {% with count=deps.count %} ...
Refactoring: - it loads the entirety of the Recipe Dependency table into memory; this doesn't scale with the number of builds - it has whitespace problems
I have loading at 681ms on my machine. Can we set up target times ?
Need to understand if this is still a problem. Targeting M3.
(In reply to comment #3) > I have loading at 681ms on my machine. Can we set up target times ? We can probably work out a target time by looking at the loading times in all other pages from Toaster 1.6. I'll ask QA to see if they can help with this.
Mihail has run some load time tests for us (see below). David, Alex, is this enough to decide what to do with this bug? **** Here’s the page load times I got after doing a bit of testing with wget: recipes: ~1780 ms tasks: ~1540ms packages: ~1440 ms time: ~1560ms cpu: ~1550ms disk I/O: ~1600ms image info: ~4000ms configuration: ~5000ms These tests were done on a Fedora machine, 8 GB RAM, i7-2600 CPU @ 3.40GHz quad-core, tested on a core-image-sato image and most importantly, DB used was sqlite. I suspect this is why the times I got were significantly larger than AlexD’s example time. Note that the first load test for all these pages were ignored, as they were significantly larger than the rest of the results (usually 2x to 3x larger) due to increased disk access time, I suspect. Cheers, Mihail
After checking with David Reyna, he is happy to mark this bug as resolved - fixed based on this patch http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=bf9ff3de5f24ffabbf7093f0664730f22d31f191 and the load times gather by QA.
Verified.