Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Speed Issues: APC + Smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
DrRighteous
Smarty n00b


Joined: 18 Jul 2003
Posts: 1

PostPosted: Fri Jul 18, 2003 8:44 pm    Post subject: Speed Issues: APC + Smarty Reply with quote

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
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Fri Jul 18, 2003 10:12 pm    Post subject: Re: Speed Issues: APC + Smarty Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP