Re: speed improvement idea: path caching

From: Date: Sat, 21 Jun 2003 01:32:48 +0000
Subject: Re: speed improvement idea: path caching
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1642@lists.php.net to get a copy of this message
> anyways. As for pruning, this I'm a bit hazy on. If we store the > paths to all compiled resources, this array could get HUGE, which > would eventually have a negative impact. Maybe just keep the most- > often used resources? I suggest storing paths to all core functions and plugins and keep that in a separate cache file since it will be static. [ aside: by editing such a file, it would be possible to force Smarty to pre-load any set of core functions or plugins that we wished so that we wouldn't have to use include's or inquire's in the PHP code for whatever we dictate as being preloaded. Smarty can automatically assign certain core functions to preload as well. ] It occurs to me that the only reason for a compiled file cache is due to the fact that the exact path to a compiled file is actually a function of the template path. Instead of a cache, perhaps a cheaper computation? I suggest that in a very simple world, the compiled template for file:/templates/sub/test.tpl would be in /templates_c/file/sub/test.tpl.php -- a very straightforward mapping. On the other hand, a template cache can get HUGE. Furthermore, it is not completely possible right now since there currently does not exist an API method to query a resource for information on its virtual pathing, etc. greetings. xo boots __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com

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