Re: Whats more efficient? (Conclusion)

From: Date: Wed, 22 Oct 2003 03:51:40 +0000
Subject: Re: Whats more efficient? (Conclusion)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-167057@lists.php.net to get a copy of this message
* Thus wrote Chris Shiflett (shiflett@php.net): > --- Ryan A <ryan@coinpass.com> wrote: > > Just one last question, you guys can reply to this off list or on: > > does using a templating engine slow down pages a lot (as i have > > heard) or increase speed (as i have heard again) ? :-D > > Things like Smarty are slow in terms of performance alone, yes. The tradeoff is > that the design these solutions allow might make life easier for the > developers. > > If your applications are serving ten million requests a day, Smarty is going to > be problematic, but you can still overcome this with some good server-side > caching (for example, is it necessary to dynamically generate a response for > every request if the data isn't very volatile?). (more i do things like...) I usually set up a minimum of 3-4 levels of caching: . regular document, only regenerate when last modified. (much easier if apache handles this) . Session lifetime. Things that change specifically to a session. Like last-login: . Per visit. although harder to detect, things like page counters. . per request. Usually this level means no caching but in certain cases this can fine tune performance under heavy loads. So when I set up a page I'll assign it a different cache level for it and generate a fresh copy depending on the level and all the rules I set up for the level. Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/

« previous php.general (#167057) next »