Last modified: 2010-05-15 15:54:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16867, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14867 - DifferenceEngine grinds on pathological case
DifferenceEngine grinds on pathological case
Status: RESOLVED DUPLICATE of bug 7601
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.12.x
All Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://wiki.xyrael.net/wiki/User:Rena...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-20 16:47 UTC by Renate
Modified: 2010-05-15 15:54 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Renate 2008-07-20 16:47:43 UTC
Generating diffs can take 20 to 30 seconds for some files not exceptionally long.

On hosted shared servers with max_execution_time set to 10, this will cause timeouts and HTTP 500's.

Related second bug that even with $wgFeedDiffCutoff = 0; diffs are generated for RSS feeds.
This causes the DifferenceEngine problem to kill the RSS feeds.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-07-20 17:04:15 UTC
It's strongly recommended that decent-sized sites use the wikidiff2 PHP module instead of DifferenceEngine.php.  Diffing is very CPU-intensive and doing it in PHP will take a long time.  max_execution_time = 10 is very restrictive and will cause failure when parsing, diffing, or doing anything else requiring much CPU time.  It's probably taking even longer than it otherwise would because the server is overloaded and/or has slow CPUs.

I doubt that there's anything here that's fixable on our side, unless you want this bug to be a generic "find a more efficient diff algorithm".  I don't see any evidence presented that this case is particularly more pathological than diffs of any other 10 KB pages with a whole bunch of lines changed.  I'm going to have to mark INVALID; either get wikidiff2 installed or get a faster/less restrictive host.  If you want to reopen and post some patches, or make this a wishlist "make diffs faster" bug, go ahead.

(In reply to comment #1)
> Nice and snappy for me.
> 
> http://test.wikipedia.org/w/index.php?title=User:OverlordQ/Sandbox&diff=61653&oldid=61652

Wikipedia doesn't use DifferenceEngine.php, so it's not really relevant.  I'll point out that wikidiff2 does use the same algorithm as DifferenceEngine.php, though, so I don't think this case is failing because it's pathological.  I think it's failing despite the fact that it's typical.
Comment 3 Brion Vibber 2008-07-30 00:19:12 UTC
Keep this open -- the diff engine *ought* to behave sensibly for any input, either working quickly or degrading or failing gracefully.
Comment 4 Tim Starling 2009-01-09 05:20:30 UTC
Good behaviour on pathological test cases was the sole reason for writing wikidiff2. It's not a simple problem to solve in PHP.
Comment 5 Chad H. 2009-05-07 15:45:16 UTC

*** This bug has been marked as a duplicate of bug 7601 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links