RE: Smarty - an observation
| From: | Alain Fontaine | Date: | Wed, 07 Feb 2001 15:05:52 +0000 |
| Subject: | RE: Smarty - an observation | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-73@lists.php.net to get a copy of this message | ||
Hi,
When you extend this idea a little bit, one could also imagine a different
way of operation in which Smarty does not actually check if a template needs
compilation at all. If you'd want to recompile the templates, you'd have to
do it manually, for instance every few hours, or days, or months (depending
on the situation of course).
That alternate mode of operation, offered in plus of the actual one, would
allow for high traffic sites whose templates don't change often at all, to
be even faster.
> -----Message d'origine-----
> De : clayton collie [mailto:ccollie@cau.edu]
> Envoyé : mercredi 7 février 2001 15:57
> À : Monte Ohrt
> Cc : Smarty@lists.ispi.net
> Objet : [smarty] Smarty - an observation
>
>
> looking at the list there seems to be be discussion going on
> concerning the
> performance of Smarty relative to other templating engines. i
> expected, like
> others, that given the design of Smarty it would be at least on
> par with the
> fastest solutions.
> one observation i made, though, on cursory examination of the code, is
> that the "compiler" code gets dragged in whether or not changes have been
> made to the template files. i suspect that when a site goes into
> production,
> templates would rarely change, if ever, so this seems to be unnecessary
> overhead.
> my thought, and suggestion, is that Smarty be slighly rewritten so that
> the compile code gets "require_once'd" only after a check is made
> to see if
> the template needs recompilation (again a rare occurrence in production
> environments). Perhaps the Smarty class can use an inner SmartyCompiler
> class that gets demand loaded if templates need refreshing (the
> loading can
> be done after the template file is assigned). Compiler code in the current
> methods of Smarty would then be stubs calling the appropriate methods of
> SmartyCompiler.
>
> just a thought. i have a few more ideas on extensions to the template
> language which i'll share as i flesh them out further...
>
>
>
> ---
> You are currently subscribed to smarty as: alain@nvision.lu
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/