Sv: Smarty and speed
| From: | anders dot janson at mailbox dot swipnet dot se | Date: | Thu, 06 Dec 2001 22:24:48 +0000 |
| Subject: | Sv: Smarty and speed | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2176@lists.php.net to get a copy of this message | ||
Från: Andrei Zmievski <andrei@ispi.net>
> Pursuant to the recent discussions, I'd like to pose the following
> questions. Do you feel that Smarty is too slow? Too bulky? Have you been
> able to isolate any specific area which seems slow? What would you
> propose as a possible solution? Rewriting certain parts of Smarty in C?
> Splitting it into more separate class files that are loaded as
> necessary? Any other comments on speed?
Perhaps it has become a little bulky but I don't see speed as a problem yet.
Rewrite in C? Well, personally I don't like that. Sure, it would be lots faster, but it would
also mean that modifying Smarty would become more difficult. Not everybody has a C compiler.
But perhaps that could become a "Smarty Pro" version, or something :-)
Splitting into smaller classes sounds more like it.
The Smarty class tries to do a little too much. As you already discussed, caching could be
implemented in a separate class. Even if it doesn't make things much smaller or faster, I think
it would improve the overall design.
One other thing that could be useful: include more than one compiler class in the distribution. For
example :one compiler that generates fastest possible {section}s, no bells and whistles, and one
that includes the kitchen sink :-)
This would cause a documentation nightmare, of course ;-)
/Anders
-------------------------------------------------
WebMail från Tele2 http://www.tele2.se
-------------------------------------------------