Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Apr 2013 at 00:24 UTC
Updated:
8 Jan 2014 at 23:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
star-szrHere is the relevant part of @Fabianx's patch from #1938430-16: Don't add a default theme hook class in template_preprocess().
Comment #2
star-szrTested with 50 nodes on the homepage.
=== 8.x..drupal_html_class-1982020 compared (517dc5e24c800..517dc6ae6625d):
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=517dc5e24c800&...
Comment #3
fabianx commentedIf this was not my patch, I would so RTBC this ... (though I really just implemented the standard cache pattern here).
Comment #4
twistor commentedCan't we just use the default argument to Drupal static, and avoid this check?
Comment #5
fabianx commented#4: Good idea. Implemented in this new patch.
Comment #6
fabianx commentedGet to work, Testbot!
Comment #8
thedavidmeister commented#5: 0001-Issue-1982020-by-Cottser-Fixed-Add-static-caching-to.patch queued for re-testing.
Comment #9
thedavidmeister commentedIf this comes back green (it should) then I'm happy to RTBC this, the change is small and the pattern being implemented here is well documented.
Comment #10
thedavidmeister commentedComment #11
catchThis should just be a regular static, there's no way the output of this function will ever change because the static was cleared.
Also I preferred the other issue about not creating default classes at all - why add the static cache rather than cut down on the number of calls?
Comment #12
fabianx commented#11: Right!
We still create classes for node template for example, so drupal_html_class is still called enough to varant a static cache (50 times for 50 nodes for example).
The other issue might or might not land. This one does not hurt and improves performance.
Re-rolling ...
Comment #13
fabianx commentedAnd a new patch with only normal static like proposed in #11.
Comment #15
catch#13: 0001-Issue-1982020-by-Cottser-Fixed-Add-static-caching-to.patch queued for re-testing.
Comment #16
thedavidmeister commentedlooks good, even simpler than the last patch.
Comment #17
fabianx commentedRe-rolled with better comment.
Comment #18
fabianx commentedX-POST, I only changed the wording of the comment per Cottsers request.
Comment #19
star-szrRTBC +1 :)
Comment #20
tim.plunkett+1, but not a bug
Comment #21
catchCommitted/pushed to 8.x, thanks!
Comment #22
David_Rothstein commentedWorth backporting, perhaps?
Comment #23
FreekyMage commentedPorted the patch.
Comment #24
star-szrLooks good, thanks @FreekyMage.
Comment #25
David_Rothstein commentedCommitted to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/08c9538