From 229529655f061863ec76db9ea557fef8b1a5161b Mon Sep 17 00:00:00 2001 From: YoBoY Date: Tue, 23 Mar 2010 22:50:41 +0100 Subject: Limiting use of readdir in the idx_indexLengths function (v2). Each searches on the wiki use this function. Scanning the index directory eachtime is time consuming with a constant series of disk access. Switching a normal search to use file_exists 1 or more times, and not readdir all the directory. Switching a wildcard search to use a lengths.idx file containing all the word lengths used in the wiki, file generated if a new configuration parameter $conf[readdircache] is not 0 and fixed to a time in second. Creation of a new function idx_listIndexLengths to do this part. --- lib/plugins/config/settings/config.metadata.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins/config/settings') diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index 2f91b0ad8..cea191f56 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -188,6 +188,7 @@ $meta['rss_show_summary'] = array('onoff'); $meta['broken_iua'] = array('onoff'); $meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); +$meta['readdircache'] = array('numeric'); $meta['_network'] = array('fieldset'); $meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); -- cgit v1.2.3