|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
DrRighteous Smarty n00b
Joined: 18 Jul 2003 Posts: 1
|
Posted: Fri Jul 18, 2003 8:44 pm Post subject: Speed Issues: APC + Smarty |
|
|
I'm in the midst of converting a existing busy PHP based website to Smarty based. The existing website is using APC Caching, but for some reason some pages after being converted to smarty are taking an additional 2 seconds to process.
This is often happening on pages that display results from searches (e.g. when the template has to loop several times to display each result in the list).
What I wanted to know is if APC will automaticly cache the "compiled" php versions of the pages? Or is there a special setup I need. Also I tried playing with the smarty caching option, but every page of my website uses dynamic results on the fly from the mysql database, so this option isn't appropreate.
Please, any information would be wonderful, the site is currently handling over 4 million page views a day (400,000 user sessions), so every fraction of a second counts to me.
Thanks, David |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Fri Jul 18, 2003 10:12 pm Post subject: Re: Speed Issues: APC + Smarty |
|
|
DrRighteous wrote: | but for some reason some pages after being converted to smarty are taking an additional 2 seconds to process. |
There are many variables to consider, not the least being how you are re-implementing your pages using Smarty. For example, if your new Smarty-ized templates are ALWAYS being recompiled then you will likely be slowing things down considerably compared to whatever you were doing before. Further, that would mean that the entire Smarty cache is redundant and simply wasting time.
Perhaps provide some code samples or general architecture points? There is no reason to believe that adding Smarty to your site should result in such a significant overhead.
You should also take care in how much data you are passing to your Smarty templates and HOW that data is being passed. If you are passing large arrays or objects, I would suggest using assign_by_ref instead of assign. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|