Robert Cummings wrote:
On Fri, 2005-04-29 at 23:55, Rasmus Lerdorf wrote:

Robert Cummings wrote:

I don't think that templates have a dependency between the number of
pages using the template and an increase in the number of functions. In
fact depending on the template, and the template engine, you can have
500 pages using the template and not a single function call. Including
the elimination of include() and include_once() calls since if the
template engine compiles to PHP it can do the includes at compile time
rather than punting to PHP to do at run-time.

While compiling to PHP is by far superior to the various terrible eval() and regex-based templating layers out there, it is still dog-slow compared to tight specialized PHP code. Just instantiating the base Smarty class, for example, takes a very long time. I optimized a Smarty site a while back where I got a 50% speedup by migrating the base Smarty class to C in an extension.


This isn't a problem for engines that compile to PHP source that has
direct hooks into the necessary data structures that will contain the
data at run time.

Smarty isn't one of them though :)

Hey Robert -- can you give an example of one that does this? I'm just curious as I haven't seen many that do this.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to