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.
Showing
- _test/cases/inc/indexer_idx_indexlengths.test.php 121 additions, 0 deletions_test/cases/inc/indexer_idx_indexlengths.test.php
- conf/dokuwiki.php 1 addition, 0 deletionsconf/dokuwiki.php
- inc/indexer.php 65 additions, 20 deletionsinc/indexer.php
- lib/plugins/config/lang/en/lang.php 1 addition, 0 deletionslib/plugins/config/lang/en/lang.php
- lib/plugins/config/settings/config.metadata.php 1 addition, 0 deletionslib/plugins/config/settings/config.metadata.php
Please register or sign in to comment