[pmwiki-users] Permalink

Petko Yotov 5ko at 5ko.fr
Wed Jul 10 08:11:40 CDT 2013


Oliver Betz writes:
> A "search" would be simple but I'm afraid it's an expensive operation.
> IIRC, links are cached so "backlinks" are faster?

A search for terms (words) should be about as fast as a search for backlinks  
(all words from a page are also cached), plus, you can exclude some terms  
from the search, eg. (:pagelist term1 term2 -term3:) will list pages  
containing "term1" and "term2" but not containing "term3".

Searching for "phrases in quotes" or content of page variables or page text  
variables is much slower, but if you have less than several hundreds of  
pages, it should be acceptable on most servers.

On pmwiki.org with 8000+ pages, (1) the ordering of the pages and (2) the  
processing and rendering of the pagelist template for every page take much  
more time then the time needed to find which pages match the search terms  
(but I suppose that for a different server it may depend on the speed of the  
filesystem). We also enable $PageListCacheDir which allows the caching of  
the list of found pages for the particular search/pagelist.

Petko




More information about the pmwiki-users mailing list