Travis Derouin wrote:
Hi,
We've had some complaints off and on about diffs taking a long time.
This happens at random times, doesn't happen often and clears itself
up after awhile. When this happens, the load on the Apache servers
seem low and the database seems ok.
We did seem to have this problem if users had the Google toolbar
installed a few months ago, but it appears that the problem is back
and unrelated.
I wonder if the job queue has anything to do with it, sometimes it
get's up to over 10,000 on us, but usually is at 0. I haven't been
able to check what it's at when users experience this problem.
Does anyone have any ideas on how to debug, or what the possible
causes might be? We're still running 1.6.7.
The PHP difference engine is slow, especially where lots of distinct
changes were made. Processing time can easily run into the minutes. It
could be that the complaints arise from such diffs, and that it appears
to be random because when you view the diff again, it is cached and thus
fast.
The solution to this is to install the C++ extension "wikidiff2", which
is fast for any input text.
The other possibility is that diffs are slow for reasons not directly
related to diffing. Display of diff pages requires loading the revision
text, which is uncached in 1.6.7, and also rendering the whole page to
HTML for display underneath the diff, which can take several seconds.
However, if this were the problem, you would expect other operations
such as page saves to suffer as well.
-- Tim Starling