You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just wanted to let you know that I had a very big performance issue with this template, it took me a while to narrow down the reason for it and I thought I will let you know about it to solve it for future updates.. (well and also improve the performance for every one else..)
I'm not sure if all PHP versions are effected..php 5.4 is though.
The modification is easy, the problem is that the very big locale array is initialized on every function call of them_locals() which is heavily used by our theme46551.
So what I did was modifying the wp-content/themes/CherryFramework/includes/locals.php file.. moved the Array $locals in a new function called theme_local_init(). I registered the variable in the global scope, like I did with a flag variable to check if this array is already initialized.
function theme_local_init()
{
global $isThemeLocalInit, $locals_CherryFramework;
if($isThemeLocalInit) return true;
$domain = CURRENT_THEME;
//... array initialization...
$isThemeLocalInit = true;
}
function theme_locals($label) {
global $locals_CherryFramework;
theme_local_init();
return $locals_CherryFramework[$label];
};
the speed up is incredible..memory footprint is much better, performance is about 4-5x faster.
regards,
Simon
The text was updated successfully, but these errors were encountered:
Hi Simon,
Thank you for your help in development. You helped us a lot. We are willing to than you and offer a promo-code for a template from TemplateMonster.com. Please provide us with your email address to let us send you the promo-code.
Hi Simon,
Thank you for your help in development. You helped us a lot. We are
willing to thank you and offer a promo-code for a template from
TemplateMonster.com. Please provide us with your email address to let
us send you the promo-code.
regards,
Kate
—
Reply to this email directly or view it on GitHub #1 (comment).
I just wanted to let you know that I had a very big performance issue with this template, it took me a while to narrow down the reason for it and I thought I will let you know about it to solve it for future updates.. (well and also improve the performance for every one else..)
I'm not sure if all PHP versions are effected..php 5.4 is though.
The modification is easy, the problem is that the very big locale array is initialized on every function call of them_locals() which is heavily used by our theme46551.
So what I did was modifying the wp-content/themes/CherryFramework/includes/locals.php file.. moved the Array $locals in a new function called theme_local_init(). I registered the variable in the global scope, like I did with a flag variable to check if this array is already initialized.
the speed up is incredible..memory footprint is much better, performance is about 4-5x faster.
regards,
Simon
The text was updated successfully, but these errors were encountered: