Re: [SMARTY-DEV] Smarty loading time
| From: | Wom.bat | Date: | Thu, 01 May 2003 20:02:12 +0000 |
| Subject: | Re: [SMARTY-DEV] Smarty loading time | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1314@lists.php.net to get a copy of this message | ||
> Hey man...cool down !
Yeah... sorry
> > In my response to your posting in smarty-general, I already told you
that
> > this is the time PHP needs to parse the file. There is no way
accelerating
> > this.
>
> Why not ?
If you eat your butter bread, you won't be finished sooner if you split it
up
into four pieces, will you?
> > It is faster on average dedicated webservers out there than on your
> > machine, and if you don't have these 35msecs, either use another
template
> > engine or try somehting like PHP Accelerator.
>
> Here we develop solution for shared server.. we dont have acces to
server's
> plugin like phpa or the like.
> and since i've try Smarty i fell in love with it... i've already work with
> phplib template but i think it made is time up !
Even on a shared server, it's at least(!) 2 times faster than on an
average development machine
On my local machine (AMD 700MHz, Windows), it takes PHP ~40msecs,
on my shared hosting account (P3, Linux, ~1000 hostings) ~15msecs,
and on my dedicated Server (Dual P3 1GHz, Linux, PHP Accelerator) ~5msecs
to parse Smarty.class.php
If you want to use Smarty, you'll need to sacrifice a little performance,
but I can tell you it's definitly worth the few milliseconds. If you take
an average 50msecs response time, you have at least 100msecs before the
first
packet of data reaches the user, plus document rendering time, plus
downloading
time, plus webserver overhead, plus client document rendering etc. the
~20msecs
(if you take a high value) it takes to parse the Smarty class aren't too
weighty.
A human being can NOT differentiate between 5 and 20ms, and unless you don't
specify the rendering time on the bottom of your documents, your client
won't
be able to tell the difference.
I am a performance optimiziation addict, too, but I had to accept these few
fractions of a second, and I guess you won't manage to get around that ;)
_Maybe_ the folks who develop Smarty will change that, but until then, it is
not worth the effort, and believe me, if it is possible, they can do it ;)
So long,
David