Re: speed improvement idea: path caching

From: Date: Sat, 21 Jun 2003 09:19:05 +0000
Subject: Re: speed improvement idea: path caching
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1647@lists.php.net to get a copy of this message
On 20 Jun 2003 16:07:11 -0500, Monte Ohrt <monte@ispi.net> wrote: > One thing Smarty does is assembles the paths to plugins and compiled > files. These paths should presumably always be the same, so why not > "cache" them for re-use instead of re-assembling them? The difficulty > will be in implementation. > We could have a $this->_file_paths() array which keeps track of plugin > paths, compiled file paths (and others?). This file is loaded upon an > invocation to find the path to a file or assemble one, and looked for > here first. You can think of it as a cache, although it might be more > appropriate to put into the compile_dir since it will be a compiled php > file with an array of data that just gets included. Isn't it possible (and simple) to cache paths (or use them directly) right in the compiled templates? I.e. modify $this->_load_plugins() and $this->_smarty_include() to work with full paths. This way path calculations are needed only at compile time, and no additional caches needed. Konstantin A. Pelepelin

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