Re: [SMARTY] Plugins dir

From: Date: Mon, 13 Oct 2003 10:49:47 +0000
Subject: Re: [SMARTY] Plugins dir
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10347@lists.php.net to get a copy of this message
On Thursday 09 October 2003 11:50, messju mohr wrote: > On Thu, Oct 09, 2003 at 11:28:43AM +0200, Armand Turpel wrote: > > Hi, > > Are multiple plugin directories with many plugins a performance killer? > > Or, from which number of plugins this is becoming a problem? 100, 200, > > 500...? > > many plugins in one directory depend on how good your operating-system > handles directories with many files in it. i don't know any > threshhold-values here if anybody else does: please enlighten me :) > > many plugin directories cost performance when the plugins are at the > end of the list. consider plugins_dir = array('a','b','c'): > plugins > in 'a' are found on the first file_exists() but plugins in 'c' need 3 > file_exists()-tests. > > i tested recently to put the full paths to the plugins-files into the > compiled template (as additional parameters to core_load_plugins()). > this saves traversal of the plugins_dir-path ones the template is > compiled. but it has one drawback: the compiled templates are not > portable across installations. i know there a people who compile their > templates on one machine and upload the compiled templates to the > production-system afterwards. i think they do because they don't want > to give the production-system write-permissions to templates_c for > security reasons. i don't think sacrificing this "feature" > (portability of the templates) is worth the very little speedup you > get on deep plugins_dir-paths. what do others here think? > > (sorry that i had more questions than answers :) > > greetings > messju I cant mesure any time difference to parsing a page that make references to plugins in this two cases: 4 plugins directories with each 400 plugins in and 4 plugins directories with each 10 plugins in. PIII 800mhz (linux). Of course caching disabled and forced template compiling. the order of the plugins in dirs: function.a_xxx.php (where xxx =3D 0-199) // contains no really function function.b_the_really _plugin_functions_xxx.php // this are my 10 plugins function.x_xxx.php (where xxx=3D 200-399) // contains no really function I'm not shure in which order smarty parse the files in directories????

« previous php.smarty.general (#10347) next »