Re: [SMARTY] Benchmarking...

From: Date: Sat, 07 Jun 2003 09:05:35 +0000
Subject: Re: [SMARTY] Benchmarking...
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9674@lists.php.net to get a copy of this message
On Sat, Jun 07, 2003 at 10:08:20AM +0200, Nino Katic wrote: > One more thing about this and that guy that reported 0,04 sec for > processing his CMS page. Well, i'm not sure if he uses some Alpha on a > 5Ghz but i'm getting 0,04 sec for a page that ONLY includes smarty, > assigns value to smarty var and displays that var in tpl. I get that on my > Duron 800, WinXP. So, result of 0,3 sec for my "normal" tpl doesn't > suprise me anymore. but if you can employ caching you don't have to assign a single variable, so the 0.04 sec sound quite realistic to me. caching is not only to save the execution of display logic, but also the execution off application logic. consider the following pseudo-index.php: <?php [init smarty] [parse very few request vars to compute $cache_id] if (!$smarty->is_cached('index.tpl', $cache_id)) { [require all application-specific stuff, that is not already loaded] [do expensive db-queries et. al] } $smarty->dislay('index.tpl', $cache_id); ?> if you omit the if...is_cached you gain nearly nothing with caching enabled, since you only save the execution of diplay-logic. but with the "if" you can save a lot more. greetings messju > Nino > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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