Re: [SMARTY-DEV] Inlining plugins/modifiers
| From: | Wom.bat | Date: | Thu, 22 May 2003 14:41:21 +0000 |
| Subject: | Re: [SMARTY-DEV] Inlining plugins/modifiers | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1487@lists.php.net to get a copy of this message | ||
> 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. the
only difference between writing the plugin directly into the source and
including it is the time it takes PHP to read (!) the plugin.whatever.php
file. And I bet you won't have more than half a millisecond for this. If you
are greedy for performance, use Smarty's nice caching mechanisms :)
PHP Accelerator might also help you a bit :)
Regards,
David