[dokuwiki] search improvements

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 25 Aug 2006 12:53:24 +0100

Hi,

I really hate it when people use throwaway lines like "slow wiki" without providing details as to what is slow under what conditions. :-)

So the comment yesterday, motivated me to look at one of the two areas I haven't really looked at yet - searching.

I have sent a patch through to Andi which revamps the ft_snippet() function. This function, or rather the preg_match_all() within it seems to be the main factor in the search page execution time.

In the test search I used (with xdebug) ft_snippet took 65% of the time, 1.74s out of 2.67s.
The new ft_snippet (xdebug) took 6.5% of the time, 0.06s out of 0.95s.
(this isn't particularly scientific, the server wasn't isolated and it wasn't run lots of times, but the difference is pretty clear).


The patch doesn't completely remove the old algorithm allowing performance comparisons to be made. Details on how to do that are included with the patch.

If/when Andi does push the patch, please test with your worst searches to see if it makes a difference and to make sure the snippets it returns are ok.

Andi, I'll send a subsequent patch to remove the multiple algorithm stuff once it has been decided which to go with.



Back on profiling, my previous offer to look at specific areas and specific circumstances elicited almost no response. Most of the profiling I have done hasn't shown any particular bottlenecks, so no target areas to look at.

If there is some part of DokuWiki's performance that concerns you, feel free to zip up your data folder and email it to me (assuming its not confidential) along with the details of when/where the performance issue occurs.

Cheers,

Chris
PS. If PHR is a member of the list, you sent me an email yesterday concerning no save button in the config plugin. My replies have been rejected due to "policy reasons" by your server.
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: