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

From: Date: Sat, 21 Jun 2003 06:19:08 +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-1644@lists.php.net to get a copy of this message
After further thinking, maybe a separate path cache per call to display() or fetch() would work best. Therefore we have a definitive set of paths to load, thus we don't have to load _every_ path just to display one set of files. This also alleviates the need for pruning. So if I load $smarty->display('index.tpl'); this will have it's own path cache file, containing the paths to every compiled file and plugin used for this page. Even dynamic things will work fine like {include file=$my_path}, it will just add the new path to the cache file when it encounters a new one. Monte boots wrote:
I meant to also mention that there is a bit of a problem with path caches for any type that maintains arrays of paths (like plugins). $smarty->plugins_dir(user_path, smarty_path); assume the path cache is built while user_dir has nothing in it. If I want to then override a smarty plugin, simply placing it in the user dir does not work since the path cache will already have an entry for the plugin. I would have to invalidate the path cache which Monte suggests would mean deleting the compile directory. I consider the compile dir a base installation issue, but the plugins I see as a user issue. Indeed, I do not keep the compile dir in a user accessible path, so needing to rebuild the smarty path cache for user directory changes represents a maintanence issue (for me). xo boots __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com


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