Closed (won't fix)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2010 at 16:08 UTC
Updated:
18 May 2010 at 17:19 UTC
Our site with lots of block and specifically, lots of Views blocks was suffering tremendously on Panels pages because of some code that was listing all blocks on the site. It does this for each pane in the panel. Queries weren't a huge problem, but Views unpacking functions were being looped through an ungodly number of times causing a bottleneck in PHP execution time.
This patch adds 2 lines of code to store the block list in a static array, so the block list only has to be generated once per page and not once per panel pane.
This patch reduced our page load time by more than half.
| Comment | File | Size | Author |
|---|---|---|---|
| ctools-block-list-cache.patch | 488 bytes | nrambeck |
Comments
Comment #1
gerhard killesreiter commentedneeds review
Comment #2
crea commentedsubscribing
Comment #3
sdboyer commentedThis probably is the best solution, as implementing the content_type callback (for retrieving information on a single specified block, rather than iterating over all blocks in the system) isn't feasible due to the listing coming from the block hook invocation. So the memory overhead from the static var is a worthwhile tradeoff. Committed, after some fixing.
Please format your patches properly in the future: http://drupal.org/patch
Comment #4
sdboyer commentedRolled back in favor of #789524: Implement "content type" callback for "block" content type.