On 27 August at 23:07, Chris Smith wrote: > Can you give some idea of the number of search successes in the files > which were returning snippets? On the second series: test matched 19 times and opt1 was better start matched 1 time and none was better description matched 1 time and opt1 was better > The key difference between opt1 & opt2 is preg_match_all v preg_match in > a short loop. My guess is, if the number of matches in the file is > larger than 3 (the max. number of context snippets returned for one > file) then opt2 does better. If the number of matches is 3 or less then > opt1 will do better. I can redo some tests today with more words, just to compare opt1 and opt2 with different number of matches. Just let me know Chris. > Is there any way to see the contribution to the total page execution > time? If they both reduce ft_snippets() timing so that its no longer > significant in the production of the page, then the choice on which one > to use can be made on other reasons besides just execution time. These are the average ft_snippets' contributions in percent of the total exec time: opt1-test 0.29 opt1-start 0.76 opt1-description 0.79 opt2-test 0.31 opt2-start 0.85 opt2-description 0.82 -- bug -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist