Closed GoogleCodeExporter closed 8 years ago
Incidentally, I did play around with the parameters at the beginning of the
file;
aside from causing the differencing operation to take much longer, they had no
significant change to the results. The final settings I used were:
// Number of seconds to map a diff before giving up. (0 for infinity)
public float Diff_Timeout = 40.0f;
// Cost of an empty edit operation in terms of edit characters.
public short Diff_EditCost = 4;
// The size beyond which the double-ended diff activates.
// Double-ending is twice as fast, but less accurate.
public short Diff_DualThreshold = 32;
// Tweak the relative importance (0.0 = accuracy, 1.0 = proximity)
public float Match_Balance = 0.0f;
// At what point is no match declared (0.0 = perfection, 1.0 = very loose)
public float Match_Threshold = 0.0f;
// The min and max cutoffs used when computing text lengths.
public int Match_MinLength = 10;
public int Match_MaxLength = 1000;
// Chunk size for context length.
public short Patch_Margin = 4;
At this point, the differencing operation (diff_main) took much longer than the
GNU
diff algorithm in Java (http://www.bmsi.com/java/#diff); the latter produces
results
similar to GNU diff in 26 seconds; the former produced the usual, inaccurate,
"the
whole file changed" results in 41 seconds.
Original comment by seanerussell
on 7 Jun 2009 at 12:38
The accuracy of the diff is not in question (it's simply reaching the timeout
and correctly returning a non-optimal solution). Merging this bug with the
performance bug since that's the real issue.
Original comment by neil.fra...@gmail.com
on 26 Aug 2010 at 4:12
Original issue reported on code.google.com by
seanerussell
on 7 Jun 2009 at 12:21