Re: [SMARTY-DEV] Inlining plugins/modifiers

From: Date: Thu, 22 May 2003 15:35:43 +0000
Subject: Re: [SMARTY-DEV] Inlining plugins/modifiers
References: 1 2 3 4 5  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1490@lists.php.net to get a copy of this message
Inlining has been thought about but not yet persued. It is a tradeoff with file size / memory footprint. With a PHP accelerator it probably would be best (performance-wise) to go inline, assuming you have plenty of disk space and memory to work with. I thought about inlining included templates too, but that would cause havoc with recursion, local vars and compilation/caching in Smarty's current form. btw, you can use Smarty's cache features to minimize files stats to templates and plugins. Monte On Thu, 2003-05-22 at 10:21, Jilles Oldenbeuving wrote: > Wom.Bat wrote: > > >>What will be done once? Done once per what? I mean, if the modifier is > >>only included once per invocation of the template (as opposed to once > >>per compilation of the template) that makes a *huge* difference for us > >>because we're having more than 1,5 milj. pageviews/day. > > > > > > plugins are included via include_once(). this means, regardless of how often > > you use the plugin, it is included ONCE per execution. and the overhead is > > near to zero, as PHP assembles the complete script before executing it. > > This "assembling" that is done by PHP, includes opening a file, right? > This can be safed if Smarty would inline the used modifiers in the > compiled template. It's an opportunity for Smarty to optimize, IMHO. > > Greetings, > > Jilles -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#1490) next »