Re: [SMARTY] Benchmarking...
| From: | alex =) | Date: | Sat, 07 Jun 2003 09:10:27 +0000 |
| Subject: | Re: [SMARTY] Benchmarking... | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9675@lists.php.net to get a copy of this message | ||
This is exactly what I do, hence the good time of 0.03-0.04 seconds. I mean, assigning different cache times per variable and/or per insert is in my opinion a bit overdoing. In my CMS, the main load lies on the admin side, and there I don't even employ a template engine. Whereas the client side has 7 scripts < 50 lines of code each and aroudn 20 classes that do all the work. But all of the above are initialized only if the requested page is not present cache. btw, 0.03-0.04 seconds per page is a time including 2 calls to one insert function that generates a banner from my banner rotator.
best regards,
alex
messju mohr wrote:
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-- .::....::.:...::...:..:.:::..:..::..::.::..:.:. Kulikov Alexey - E-Com Development Consultant +43 699 1 9228792 | alex@inses.biz