Re: [SMARTY-DEV] Inlining plugins/modifiers
| From: | Wom.bat | Date: | Thu, 22 May 2003 15:24:33 +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-1489@lists.php.net to get a copy of this message | ||
> 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.
the difference between inline code and code sitting in an external file
is ONLY opening the file, reading it, and closing it... not more...
David