Re: [SMARTY] optimization techniques
| From: | Monte Ohrt | Date: | Fri, 20 Dec 2002 14:24:42 +0000 |
| Subject: | Re: [SMARTY] optimization techniques | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6913@lists.php.net to get a copy of this message | ||
What do you mean by compressor? If you mean stripping out extra white
space, there is an output filter you can enable for that. If you mean
gzipping the output to the browser, that is outside of the scope of
Smarty. Let PHP or Apache to that.
Monte
On Fri, 2002-12-20 at 07:55, Alexander Pervak wrote:
> Hello Paul,
>
> I use such technique, that have behaviour much like html compressors.
> I get a good results on a big pages.
> BTW, I wonder why did this feature wasn't include in Smarty yet.
>
>
> This is my main template file which used for assembling different
> template pages:
>
> {config_load file=main.conf section="setup"}
>
> {capture name=with_trash}
> {include file="header.tpl"}
> {include file=$ct->tpl.curr_tpl}
> {include file="footer.tpl"}
> {/capture}
> {$smarty.capture.with_trash|regex_replace:"/[\r\t\n]/":""}
>
> This way lacks with deletion of spaces between tags.
> It would be helpfull to see something like this in next releases of
> Smarty. Then I can write
>
> $smarty->compressed='on';
>
> Friday, December 20, 2002, 6:50:43 AM, you wrote:
>
> PL> What optimization techniques can people recommend in a nutshell? Yes, I
> PL> have read the manual and seen things like turning off $compile_check and
> PL> use caching, but I'm sure that there are other techniques that may not
> PL> necessarily be related to settings in Smarty, but rather to the actual
> PL> programming techniques involved with the templates. Any comments would
> PL> be appreciated!
>
> PL> ~Paul
>
> --
> Best regards,
> Alexander mailto:shura@ukrsat.com
--
Monte Ohrt <monte@ispi.net>