Re: poor performance (unfair test?)
| From: | August Zajonc | Date: | Sun, 28 Jan 2001 04:36:01 +0000 |
| Subject: | Re: poor performance (unfair test?) | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-17@lists.php.net to get a copy of this message | ||
I think the majority of the sites don't have a caching solution installed,
and so Smarty will be significantly slower on those. Presumably, sites that
care about performance will be using a caching solution. We certainly are.
Even in a caching situation however larger files will be loaded, but as they
aren't parsed that should be irrelavant.
I used a simple example because I wanted to try and isolate template
performance as much as possible. Most of the more complex scripts we run
require database calls, file accesses etc which will be a constant floor
between both solutions. That said, I'll look at converting some portion of
our site to Smarty for real world testing. We generate 500,000 files from
templates periodically, and I obviously am interested in optimizing that
process. The problem is I think the overhead in loading from db as well as
storing and compressing the output to disk may make overwhelm any
performance changes with the templates.
August
> -----Original Message-----
> From: Monte Ohrt [mailto:monte@ispi.net]
> Sent: Saturday, January 27, 2001 8:01 PM
> To: Smarty@Lists.ispi.net
> Subject: [smarty] Re: poor performance (unfair test?)
>
>
> When I ran your test with Smarty, my system was taking an average of
> 0.336 seconds to complete.
>
> Of this 0.336 seconds, the first 0.303 of it was spent with PHP
> compiling the op-tree code. Once Smarty actually executed, it took 0.033
> seconds to complete!
>
> So what your test concludes is that phplib class has less code than the
> Smarty class, thus PHP compiles it faster. Of course it does, it is a
> much simpler templating system. With small tests like these, the simple
> template engines will win out every time. Caching solutions such as APC
> or Zend Cache would help make these benchmarks a fair test.
>
> What I'd like to see is Smarty benchmarked against a real-world
> application, something that does a little more than a simple array loop.
>
> For instance, this entire site is run on the Smarty template engine:
> http://nebraska.statepaper.com
>
> I wonder how other template engines would fare with something like this?
> Not only speed, but the time it takes to build the templates, and the
> managability of them.
>
>
> ---
> You are currently subscribed to smarty as: augustz@bigfoot.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
>