Closed (duplicate)
Project:
Sections
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2010 at 09:23 UTC
Updated:
18 Sep 2010 at 09:43 UTC
Jump to comment: Most recent file
Comments
Comment #1
mrfelton commentedYou'll need to apply the patch from #685736: Node theme doesn't take precedence over path based sections before applying this.
With that other patch applied, the sections determination is done in hook_init(). This only happens once, and once that has been run, we know what section we are in so there is no need to ask the database again. I have used a global to store the active section, and then in hook_preprocess(), we can simply look at the global to find out what section we are in, rather than asking the database again and again.
Comment #2
mrfelton commentedNote that on a typical page on my site, this shaves off between 30-80 database queries!
Comment #3
mrfelton commentedOops - slight issue with that patch. Use this one.
Comment #4
hass commentedThere has already been a path committed to fix the performance issues
Comment #5
hass commented#785554: Statically cache sections data (Performance optimization)