For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > July 2004 > Re: [SMARTY] smarty performence









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] smarty performence
Boots

2004-07-27, 9:00 pm

--- Anders Gjermshus <gjermshus@digitale-mesterverk.no> wrote:
> Hi.
>
> I have some questions about performance of smarty.
>
> We have a portal with 50 000 users and about 500 to 1000 people
> online at
> the same time. We want to use Smarty in our new version of the
> portal. But
> how would it perform under this situation. Would use of smarty make
> the page
> slower? Or any change in speed all? And how would the load on the
> server be?


Since performance is a relative measure, it depends on your current
implementation. In general Smarty is not a performance tool but rather
a development tool that provides an extra abstraction layer.
Abstractions usually imply a performance hit though Smarty attempts to
mitigate that by compiling templates into straight PHP code (and even
then, only when the source templates change). Additionally, Smarty
provides a content caching service out of the box which can further
minimize the need to do PHP processing (for example db hits). If you
currently aren't doing content caching then Smarty may actually help
improve your performance. Typically, if you are using a PHP accelerator
of some kind and have a decent application framework then Smarty's
impact on performance should be fairly neutral.

YMMV, so before diving in, it is best to make some test cases to decide
if Smarty is suitable for you. Of course, being a PHP application, you
can typically scale your site with hardware if you adhere to the
so-called shared-nothing approach.

xo boots
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com