Re: [SMARTY] Too many includes

From: Date: Fri, 04 Jul 2003 06:18:42 +0000
Subject: Re: [SMARTY] Too many includes
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9833@lists.php.net to get a copy of this message
Hi, thanx for your tips. :-)
for several reasons I had to build a template which contains lots of other templates (up to 100) . I cannot change this easily, maybe I cannot change this at all. Those are "nested templates", about 4-5 different templates which repeat, see http://www.3uu.de/nestedtemplates.jpg. It takes a lot of time for Smarty to __include__ all the templates, do you have any idea how to improve the performance? (Beside throwing away our templates). hmm, not easy. - you can try to employ a source-code cache like phpa ( http://www.php-accelerator.co.uk/ ). smarty benefits vastly by it in general and i think includes especially.
I will try this next. We had a problem with phpa when we worked with it last time: the accelerator used all the memory after some time, maybe a configure thing.
- you can write a prefilter the resolves the includes at compile-time before the template is passed to the compiler. some preg_replace-magic should do it. if you have dynamic includes ('{include file=$var}'
what exactly do you mean with "resolving the includes", work with eval? Hm. CU Dorthe

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