Re: [SMARTY-DEV] Re: speed improvement idea: path caching

From: Date: Sat, 21 Jun 2003 20:13:20 +0000
Subject: Re: [SMARTY-DEV] Re: speed improvement idea: path caching
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1664@lists.php.net to get a copy of this message
--- Jason Sweat <sweatjejm@mchsi.com> wrote: > This thread reminds me somewhat of the "inline" coding thread that > came up earlier. That thread seem to go down the path of trying to > take the modifiers and migrate them into the code where each was > called, similar to a C inline. It reminds me of that too but without the hassle of actually inlining code and the uncertain performance characteristic that will yield. If you recall, that other thread ended mainly because the metrics on the potential speed-up were very unclear and did not necessarily favour a speedup for inlined code (though I think it has potential if done right). This alternative with path caching is only trying to mitigate the need to do lookups in the file system. > Would it not make more sense (and eliminate some of this path issue?) > to take the _contents_ of the plugin function and append it to the > compiled template? (once per template per plugin) A reference to the > plugin function would then be locally defined in the compiled template > script. > > This would mean you would have to recompile templates if you want to > change the behavior of a plugin, but it should eliminate many > includes, one for each plugin used in a template. I'm still in favour of investigating more inlining, but I think that it is better to start with the path caching. The way I see it, is that if you are already accelerating your PHP includes, then the difference in the above should not be very big, typically while the path cache should be helpful all-around. __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com

« previous php.smarty.dev (#1664) next »