Last modified: 2006-02-02 20:39:58 UTC
See the quoted URL. MediaWiki is unable to compute this diff. When I try to load this page I get the error
Fatal error [host=]: Maximum execution time of 30 seconds exceeded in /usr/local/apache/common-
local/php-new/includes/DifferenceEngine.php on line 436
On my local machine a "diff" of the corresponding page sources takes 0.03 seconds. This suggests that
there is a bug in the MediaWiki diff implementation.
The effect of this bug is that it may be impossible to figure out what has changed between two revisions
of a page. A clever vandal could exploit this bug to cover their tracks.
Testing this page on my test box at home (Athlon XP 2400+) in MediaWiki 1.4:
Using the new wikidiff module (C++ reimplementation of the diff code), the diff
takes about 0.5 second (on top of the page rendering overhead), which is slower
than it could be but not too awful. The PHP version (roughly the same code as in
1.3) takes a whopping *41.5* seconds if allowed to run to completion.
They don't give exactly the same output, but both are highlighting a huge number
of changed lines; looking closer, the first revision in that diff has a space at the end
of nearly every line; in the second it's been removed. Thus some couple of thousand
lines get individually diff'ed up.
Perhaps it's not sensible to do this kind of heavy processing in PHP?
(In reply to comment #2)
> Perhaps it's not sensible to do this kind of heavy processing in PHP?
Hence the C++ plugin version. It's probably possible to make the PHP code
much more efficient, though.
Note that this is a pathological case: thousands of paragraphs/lines
changed where typically one gets just a few. Even a longish article like
[[Zuiderzee Works]] is under two hundred lines, and a massive change
(removal of all link brackets) on that page diffs in about 0.7 seconds on the
PHP version on the same box. This particular diff has one order of
magnitude more lines, but takes two orders of magnitude longer to run.
Most of the time on this diff is spent in the loop in _DiffEngine::_diag(),
when it's running over a couple of massive chunks of adjacent lines.
MediaWiki 1.4 still can't show the diff. However, it now shows how far it got
(about three quarters of the way through the page), before producing the error:
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/local/apache/common-local/php-1.4/
includes/DifferenceEngine.php on line 614
for another failed page diff. The page shrank by 1.3 MBytes,
and the diff fails almost immediately with
Fatal error: Allowed memory size of 100000000 bytes exhausted
Presumably diffing a 1MB file shouldn't require 100MB of memory?
Trying the [[List_of_Royal_Navy_ship_names]] example link gave the page text:
Sorry- we have a problem...
The wikimedia web server didn't return any response to your request.
To get information on what's going on you can visit #wikipedia.
An "offsite" status page is hosted on OpenFacts.
Generated Wed, 29 Jun 2005 18:47:49 GMT by srv5.wikimedia.org
But trying to view the source of the error page shows this instead:
<b>Parse error</b>: parse error, unexpected '=', expecting ')' in
<b>/usr/local/apache/common-local/php-1.5/InitialiseSettings.php</b> on line
(In reply to comment #7)
> <b>Parse error</b>: parse error, unexpected '=', expecting ')' in
> <b>/usr/local/apache/common-local/php-1.5/InitialiseSettings.php</b> on line
> <b>54</b><br />
The parse error has since been reported by Guy M at bug 2617.
MediaWiki 1.5 can now display the diff! Thank you.