Smaller Size?

From: Date: Wed, 23 Jan 2002 19:23:15 +0000
Subject: Smaller Size?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2570@lists.php.net to get a copy of this message
Is it possible to make Smarty more compact and "modularized?" What I mean is, it seems like a very large class (over 1500 lines), most of which doesn't seem to get used on a typical page, especially once the app is in place. It seems like you could do the same with other functions as you have with the compiler class - make different classes for the config, caching, etc., all included only if they're needed for a specific page. Like, I never use config files, or these strange function things you have written in all over the place (to allow people to add their own functions, maybe?), or these 'addins,' debugging, or any other strange functions. I don't use anything (unless it's called internally) from the custom_funcs or the custom_mods. It seems like Smarty is touted as being all fast, which is probably true, but it could be faster if it didn't load so much in the class itself. if($this->caching) { // include class.smarty.cache.php } if($this->debug) { // include class.smarty.debug.php } It just seems like 1500 lines for the base class, and over 800 for the addins class, all loaded each and every time a smarty page is called, seems a bit excessive. Especially if the template is already cached/compiled and you don't need any of the other stuff that's included with the class.

« previous php.smarty.general (#2570) next »