Shelling out to /usr/bin/diff and then parsing its output by hand in DiffParser sounds too complicated in addition to being slowww, just use DiffEngine to get the list of changes directly. Also, I'm deprecating wfDiff().
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Addshore | T158120 EchoDiscussionParserTest is slow | |||
Resolved | WMDE-Fisch | T93625 Don't use wfDiff() in Echo |
Event Timeline
Look into using HHVM's LightProcess https://github.com/facebook/hhvm/blob/master/hphp/util/light-process.h
I think that's supposed to be rOMWC4f333a850fe9: Unset $wgDiff, so we stop shelling out to diff, but that still doesn't fix this bug, which is to not use wfDiff().
A volunteer wants to wfDeprecate() it, thus Echo's unit tests migh break if diffing is tested at all.
Change 335791 had a related patch set uploaded (by Legoktm):
Use internal diff engine
After Echo, there is one usage left in Wikimedia Git (not counting unit tests and maintenance scripts).
157 $text2 = $vars->getVar( $text2Var )->toString() . "\n"; 158 $result = wfDiff( $text1, $text2 );
I created T158850: Don't use wfDiff() in AbuseFilter for AbuseFilter.
So this task T93625 could get closed as resolved?
Change 339622 had a related patch set uploaded (by WMDE-Fisch):
Remove test for internal diff engine acceptance