Re: Smarty - an observation
| From: | Monte Ohrt | Date: | Wed, 07 Feb 2001 15:12:32 +0000 |
| Subject: | Re: Smarty - an observation | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-75@lists.php.net to get a copy of this message | ||
Hi Clayton,
Good idea. We had similar thoughts during the early development cycles
of Smarty, but at that time there wasn't enough "extra" code to warrant
a code split. However, looking at the code as Smarty stands today, this
would eleminate about half of the class, which would be a nice speedup.
We'll add this to the TODO list.
On a side note, it's good to see people thinking and contributing their
thoughts to the list, this really helps the development direction of
Smarty. Thanks to all for your input!
clayton collie wrote:
>
> 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: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/