Tags:
search1Add my vote for this tag create new tag
view all tags

Question

I have a twiki web with about 2000 topics in it. Loading the WebSearch page for that web is very slow sometimes. Running "ps" on the server while the page is loading, I see that there is a "grep" command running that is searching for the string "something.Very/unLikelyTo+search-for;-)" across all of the pages in the web. Is this some sort of prefetch optimization, to try to bring all the pages in the web into the server's disk cache, so a subsequent search will be fast? The effect is that the WebSearch page can take a very long time (10s of seconds) to load.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, SpreadSheetPlugin, BugzillaLinkPlugin, CommentPlugin, EditTablePlugin, InterwikiPlugin, RenderListPlugin, SessionPlugin, SlideShowPlugin, SmiliesPlugin, TablePlugin
Server OS: Red Hat Linux 9, kernel 2.4.24
Web server: Apache 2.0.40 (redhat RPM 2.0.40-21) + SpeedyCGI 2.22
Perl version: 5.8.0 (redhat RPM 4.8.0-88)
Client OS: Red Hat Linux 9
Web Browser: Mozilla Firefox 1.0
Categories: Performance

-- MarcUnangst - 21 Jan 2005

Answer

Interesting - this appears to be due to the %INCLUDE% introduced in revision 1.12 of the TWiki.WebSearch page. Not sure why this was added, but if you don't need it for searches that pass a parameter using %URLPARAM% to WebSearch, you could just delete it from TWiki.WebSearch. TWiki.org's Codev has the same problem with this search slowing things down - thanks for pointing it out.

PeterThoeny: any comments on what this embedded search is doing?

-- RichardDonkin - 27 Jan 2005

The advantage of the embedded search is that you see the result on the search page and can refine the search as needed without going back to the previous screen.

When you visit the WebSearch page you see an empty search, e.g. zero returns. Behind the scene is an embedded SEARCH with an empty URLPARAM, e.g. a search with an empty search string. TWiki still does a search for something unlikely to find in order to return zero hits. This results in a slow display of the search page if there are many topics in a web.

Two options to fix that:

  • Use a SpreadSheetPlugin formula to disable SEARCH if the URLPARAM is empty
  • Fix Search.pm to avoid a search if the search string is empty (preferred method)

-- PeterThoeny - 27 Jan 2005

Since this is a probable usability improvement, I think fixing Search.pm is the best approach.

Marc - you should be able to just delete the INCLUDE line from TWiki.WebSearch without problems.

-- RichardDonkin - 28 Jan 2005

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-02-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.