Re: Fw: Smarty: Attack of the Plugins
| From: | Brent R. Matzelle | Date: | Wed, 13 Feb 2002 17:48:45 +0000 |
| Subject: | Re: Fw: Smarty: Attack of the Plugins | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2682@lists.php.net to get a copy of this message | ||
I use Apache Benchmark which comes with Apache. Example:
# ab -c 10 -n 500 http://localhost/test_page.php
(10 concurrent users, 500 total requests)
Brent
--- LIMBOURG Arnaud <arnaud.limbourg@cegetel.fr> wrote:
> her, dumb question how to run the tests on win to get fetches like
> *nix ?
>
> > -----Original Message-----
> > From: Monte Ohrt [mailto:monte@ispi.net]
> > Sent: Wednesday, February 13, 2002 3:29 PM
> > To: smarty@lists.ispi.net
> > Cc: smarty@lists.ispi.net
> > Subject: [smarty] Re: Fw: Smarty: Attack of the Plugins
> >
> >
> > Manfred, FYI turning off compile_check will get you another
> noticable
> > performance increase. You'll just have to clear templates_c each
> time
> > you change a template.
> >
> > Here are a few tests I did on a Linux box (pentium 533), using
> > php-accelerator.
> >
> > Smarty: no cache, compile_check off. Apache: 1.3.23, PHP: 4.1.1.
> >
> > hello world
> > -----------
> >
> > Smarty, non-accelerated: 13.10 fetches/sec
> > Smarty, accelerated: 91.99 fetches/sec
> >
> > print template variable 500 times
> > ---------------------------------
> >
> > Smarty, non-accelerated: 9.49 fetches/sec
> > Smarty, accelerated: 63.38 fetches/sec
> >
> >
> > loop over array of values
> > -------------------------
> >
> > Smarty, non-accelerated: 12.79 fetches/sec
> > Smarty, accelerated: 83.55 fetches/sec
> >
> >
> > As you can see, Smarty speeds up _significantly_ with php
> > acceleration,
> > by 6-9 times in these tests.
> >
> >
> > Manfred Wischin wrote:
> > >
> > > ----- Original Message -----
> > > From: "Manfred Wischin" <office@wischin.at>
> > > To: "Andrei Zmievski" <andrei@ispi.net>
> > > Sent: Tuesday, February 12, 2002 5:35 PM
> > > Subject: Re: [smarty] Smarty: Attack of the Plugins
> > >
> > > > Hi! Thanks for the great work!
> > > >
> > > > I did some benachmarks on one of my applications:
> > > >
> > > > Redhat 7.2, PHP 4.0.6, Mysql (pear), Duron 600, 512 MB Ram
> > > > always compile: off
> > > > compile check: on
> > > > chache: off
> > > >
> > > > Smarty 1.5.2 without php_accelerator:
> > > > Marker Diff Sum
> > > > Start 0 0
> > > > Siteswift Basics 0,013 0,013
> > > > Session Init 0,0008 0,0139
> > > > Smarty Init 0,04 0,0539
> > > > DB Init 0,0368 0,0907
> > > > Accounting 0,0139 0,1046
> > > > ProcessPage Start 0,0002 0,1048
> > > > include: tags_topbar_pfarrblatt.tpl 0,0053 0,1312
> > > > include: tags_left_nav.tpl 0,0041 0,1354
> > > > include: mod/mod_articles_headlines_pfarrblatt.tpl
> > 0,0334 0,1691
> > > > include: tags_footer1.tpl 0,0049 0,1748
> > > > include: tags_footer2.tpl 0,0022 0,1772
> > > > ProcessPage End 0,0004 0,1776
> > > > Stop 0,0002 0,178
> > > >
> > > >
> > > > Smarty 1.5.2 with php_accelerator:
> > > > Marker Diff Sum
> > > > Start 0 0
> > > > Siteswift Basics 0,0013 0,0013
> > > > Session Init 0,0008 0,0021
> > > > Smarty Init 0,0023 0,0044
> > > > DB Init 0,0043 0,0087
> > > > Accounting 0,0121 0,0208
> > > > ProcessPage Start 0,0002 0,021
> > > > include: tags_topbar_pfarrblatt.tpl 0,0036 0,0391
> > > > include: tags_left_nav.tpl 0,0029 0,0422
> > > > include: mod/mod_articles_headlines_pfarrblatt.tpl
> > 0,0154 0,0578
> > > > include: tags_footer1.tpl 0,0036 0,0621
> > > > include: tags_footer2.tpl 0,0015 0,0638
> > > > ProcessPage End 0,0003 0,0642
> > > > Stop 0,0002 0,064
> > > >
> > > >
> > > > Smarty snapshot without php_accelerator:
> > > > Marker Diff Sum
> > > > Start 0 0
> > > > Siteswift Basics 0,0133 0,0133
> > > > Session Init 0,0009 0,0141
> > > > Smarty Init 0,0294 0,0435
> > > > DB Init 0,0365 0,08
> > > > Accounting 0,014 0,094
> > > > ProcessPage Start 0,0002 0,0942
> > > > ProcessPage End 0,0744 0,1686
> > > > Stop 0,0002 0,169
> > > >
> > > > notice: It seems, that some markers are not reached, but
> > the output seems
> > > ok
> > > >
> > > > Smarty snapshot with php_accelerator:
> > > > Marker Diff Sum
> > > > Start 0 0
> > > > Siteswift Basics 0,0013 0,0013
> > > > Session Init 0,0008 0,0021
> > > > Smarty Init 0,0022 0,0043
> > > > DB Init 0,0044 0,0087
> > > > Accounting 0,0124 0,0211
> > > > ProcessPage Start 0,0002 0,0213
> > > > ProcessPage End 0,0433 0,0646
> > > > Stop 0,0002 0,065
> > > >
> > > > notice: It seems, that some markers are not reached, but
> > the output seems
> > > ok
> > > >
> > > > My conclusion:
> > > > The new version is slightly faster when not using the php
> > accelerator. The
> > > > new plugin concept makes reading and maintaining the code
> > much easier.
> > > > As you can see the initialisation of pear DB is much more
> > expensive then
> > > the
> > > > initialisation of the smarty template engine.
> > > > What i need to further inversigate ist, why my timing
> > markers are not
> > > > reached in the new version, although the output seems ok
> > and the timing
> > > > reasonable. (these markers should be reached by php code
> > embedded in the
> > > > templates - some kind of componentized templates)
> > > >
> > > > Another conclusion ist, that smarty seems to be extremely
> > accelerartor
> > > > friendly by significantly improving speed by 2,8 times.
> > > >
> > > > cu
> > > > Manfred
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Andrei Zmievski" <andrei@ispi.net>
> > > > To: <smarty@lists.ispi.net>
> > > > Sent: Friday, February 08, 2002 11:00 PM
> > > > Subject: [smarty] Smarty: Attack of the Plugins
> > > >
> > > >
> > > > > We've been threatening to make Smarty support plugins
> > for a while now,
> > > > > and now it's actually done. Smarty has been
> > re-architectured to use
> > > > > plugins wherever possible. The following functionality is
> now
> > > > > "plugged-in":
> > > > >
> > > > > * modifiers
> > > > > * custom functions
> > > > > * compiler functions
> > > > > * prefilters
> > > > > * postfilters
> > > > > * resources
> > > > > * inserts
> > > > >
> > > > > Smarty.addons.php is no more: it's been converted into
> > the contents of
> > > > > plugins/ directory which you will find in the latest
> > snapshot of Smarty,
> > > > > available at:
> > > > >
> > > > >
> > > >
> > >
>
http://www.phpinsider.com/php/code/Smarty/snapshots/Smarty-snapshot-20020208
> > > .tar.gz
> > > >
> > > > There is no plugin documentation at the moment, but,
> basically, you
> can
> > > > look at files in plugins/ directory and figure out how they
> work.
> Please
> > > > test this snapshot and let us know if you find any problems
> or
> > omissions.
> > > >
> > > > Adieu,
> > > >
> > > > -Andrei
> > > > * I am a legend in my spare time. *
> > > >
> > > > ---
> > > > You are currently subscribed to smarty as: office@wischin.at
> > > > 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:
> arnaud.limbourg@cegetel.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: bmatzelle@yahoo.com
> To unsubscribe send a blank email to
> $subst('Email.Unsub')
> Visit Smarty's homepage at
http://www.phpinsider.com/php/code/Smarty/
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com