Re: [SMARTY] Benchmarking...
| From: | Nino Katic | Date: | Sat, 07 Jun 2003 10:47:45 +0000 |
| Subject: | Re: [SMARTY] Benchmarking... | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9678@lists.php.net to get a copy of this message | ||
> 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);
>
> ?>
Yep, i know this but i still didn't succed to make it go under 0.2 sec.
I'll try my best to optimize it. When we talk about aplic. caching (not
design) i don't know how to cache this...
Suppose you have a index.php process a user form. If a user makes false
input in the form, you have to show the form again with the correct fields
values written in the form and error msg beside wrong input fields. Now,
how to cache this on aplication side? First, you have to process the form
exery time so caching it wouldn't be good, second, design cache is also
questionable because different users will enter different data in the
fields which (if an error happens in some field) you have to show as
correct ones with correct values. So, i find all this thing very
complicated or maybe i'm low on iq :-) Btw. thx. for help.
Nino