Closed (fixed)
Project:
Skinr
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2013 at 19:02 UTC
Updated:
14 Dec 2015 at 18:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kbahey commentedThe patch for the most recent dev branch passes.
So effectively this is "needs review".
Comment #3
moonray commentedReviewing D7 patch:
Have you run any performance tests to prove the efficacy of this patch?
Both
skinr_get_skin_info()andtheme_get_registry ()are cached in their own functions. The only one that has no caching (which seems fairly minimal) isskinr_current_theme().Comment #4
moonray commentedComment #5
mikeytown2 commentedThere is a whole article on this patch
http://2bits.com/cpu/solving-high-cpu-usage-and-reducing-page-generation...
Comment #6
moonray commentedI did the same tests as the article described in the drupal 7 version, and with or without the patch I get pretty much identical results.
Perhaps the problems are only there on the 6.x versions?
EDIT: Running tests on D6-2.x I'm not getting very different results either between the two versions.
EDIT 2: Now, granted, I'm working with a close to vanilla site with a few skins applied. Considering this is a small patch that might improve performance, but has no negatives to it, I'll add it (with some minor tweaks).
Comment #7
moonray commentedAttached is my updated patch. It's slightly cleaner and has inline comments.
Comment #8
moonray commentedAnd here's the D6-2.x patch.
Comment #9
moonray commentedAnd lastly, the 6.x-1.x patch.
All have been committed.
Comment #11
CzarnyZajaczek commentedI've tested it, surprisingly it makes difference - 70 calls to skinr_preprocess, and difference about 90 to 130 ms on one of my Drupal 6 installations. Thanks for that patch
Comment #11.0
CzarnyZajaczek commentedAdding link to article describing the issue.
Comment #12
ezeedub commentedOops, $current_theme is removed above (should be string literal 'current_theme'). (probably should have opened a new issue since this is already merged... apologies if that's the case)
Comment #14
moonray commentedSee #2630622: Undefined variable: current_theme for followup problem.