Re: Smarty perfs

From: Date: Wed, 13 Feb 2002 09:26:12 +0000
Subject: Re: Smarty perfs
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2676@lists.php.net to get a copy of this message
Hmm, right now I'm building together a co-branded portal solution using Smarty as the backend template core piece and noticed some performance issues in regards to the time the script executes to the time in which a custom Smarty function stops the timer and prints out the time of execution. The test was made on a PIII 650 FreeBSD machine with 128 MB RAM and after each execution on page with at least 10 loops on 1 section, it'll generate in about 1.2s when the equivalent style looping on another script that will load a header file, then loop another file as a bit, then the footer will generate in about .4s. If the amount of looping decreases in Smarty, the better the performance. I've tried the latest version of PHPAccelerator which just came out for FreeBSD and it improves performance between SQL queries as I time each SQL as a break point to echo the current time since execution. As for Smarty, I'd see a drop from 1.4s which is with Zend Optimizer only to 1.2s /w phpA. I've think I have tweak just about all I can with the code other than generating indexes on the SQL tables and looking at the time after all SQL queries were executed, it's currently faster at the SQL querying though there's a few milliseconds that I'd like to lower, at least get it under 1s :) Still I'm quite happy with Smarty and indeed it's core is much more complex than any other template library which is why I'm sticking to it rather than ditching it. Just as a side note, the same portal script executes in 0.09s on a Athlon XP 1900+ 256 MB DDR :) -----Original Message----- From: mohrt@ns3.ispi.net [mailto:mohrt@ns3.ispi.net]On Behalf Of Monte Ohrt Sent: Monday, February 11, 2002 2:31 PM To: smarty@lists.ispi.net Cc: smarty@lists.ispi.net Subject: [smarty] Re: Smarty perfs I would venture to guess that the performance difference is coming from the time it takes to compile the Smarty libraries, since they are probably larger than most template engines out there. The plugin architecture may help in situations without an accelerator (although I'd highly recommend one, with or without Smarty.) Out of curiosity, try the test again with php-accelerator. http://www.php-accelerator.co.uk/ Dominique Peretti wrote: > > No accelerator... and Smarty 1.4.5 > On 11/02/02 15:14, "Monte Ohrt" <monte@ispi.net> wrote: > > > Are these with or without a php accellerator? > > > > LIMBOURG Arnaud wrote: > >> > >> Hello, > >> > >> After reading some comments about the templates solutions benchmark (which > >> was talked about last week). I saw that Smarty had bad performance with > >> caching turned on. Compared to ModeliXe for example. > >> > >> So, i wonder if this comes from the benchmark, from the way smarty handles > >> caching or anything else. > >> > >> SCRIPT A SCRIPT B SCRIPT C SCRIPT D > >> PHP4 100% 100% 100% 100% > >> FastTemplates 40,20% 38,30% 36,89% 34,67% > >> PHPLib 82,27% 80,49% 84,96% 76,50% > >> VTemplate 66,58% 66,74% 70,71% 60,62% > >> ModeliXe > >> cache_delay = 0 54,36% 55,82% 59,14% 49,81% > >> cache_delay = 5 82,84% 89,46% 96,88% 82,80% > >> Smarty > >> compile_check = true et caching = false 48,64% 50% 53,92% 45,38% > >> compile_check = true et caching = true 65,38% 71,35% 85,90% 65,56% > >> compile_check = false et caching = false 50,66% 52,16% 56,64% 47,30% > >> compile_check = false et caching = true 66,41% 71,65% 86,44% 65,19% > >> > >> Can be seen page 55 at http://www.phpindex.com/download/Templates_V1.1.pdf > >> > >> --- > >> You are currently subscribed to smarty as: monte@ispi.net > >> To unsubscribe send a blank email to $subst('Email.Unsub') > >> Visit Smarty's homepage at > >> http://www.phpinsider.com/php/code/Smarty/ > > > > -- > > Monte Ohrt <monte@ispi.net> > > http://www.ispi.net/ > > > > --- > > You are currently subscribed to smarty as: dperetti@noos.fr > > To unsubscribe send a blank email to $subst('Email.Unsub') > > Visit Smarty's homepage at > > http://www.phpinsider.com/php/code/Smarty/ > > > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/ --- You are currently subscribed to smarty as: jchum@aismedia.com To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/

« previous php.smarty.general (#2676) next »