Re: Package Proposal: HTML_Template_Dummy
| From: | Alan Knowles | Date: | Sat, 19 Jul 2003 15:23:36 +0000 |
| Subject: | Re: Package Proposal: HTML_Template_Dummy | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18436@lists.php.net to get a copy of this message | ||
Just for information -without commenting in detail on 'Dummy' (great name though)
Flexy, like probably Smarty/Xipe, after a template is compiled, do not load any other classes other than the main one. (Flexy comes in at 22k, although that should go down after the last of the compile code is moved into the rendering layer.) The only penalty you get is two filemtime checks on the original and the target, while may be not ideal for Yahoo, its unlikely to be a significant issue anywhere else.
Regards
Alan
As far as "waste" goes: Please note that the total size of HTML_Template_Dummy is 12.5k even with all of the "extra" convenience functions (and it's a liberally-documented 12.5k -- strip the comments and it's even smaller). In a purely technical sense, you are exactly right: it is a "waste" to load the code when you may not use it; on the other hand, in a practical every-day sense, the "waste" is so small as to be insignificant in relation to the rest of the app, and even more insignificant in relation to full-up engines like Xipe and Smarty.