Use HistogramDiff by default in DiffFormatter

Its behavior is similar to PatienceDiff, and runs nearly as fast,
often beating the performance of MyersDiff.

Change-Id: I43c3faefa8109f1a68ef57522bec9cf27b5df252
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2010-09-21 15:26:03 -07:00
parent 14da6e0b9d
commit 6048f34c58
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ public class DiffFormatter {
private int abbreviationLength = 7; private int abbreviationLength = 7;
private DiffAlgorithm diffAlgorithm = MyersDiff.INSTANCE; private DiffAlgorithm diffAlgorithm = new HistogramDiff();
private RawTextComparator comparator = RawTextComparator.DEFAULT; private RawTextComparator comparator = RawTextComparator.DEFAULT;
@ -213,7 +213,7 @@ public void setAbbreviationLength(final int count) {
* *
* @param alg * @param alg
* the algorithm to produce text file differences. * the algorithm to produce text file differences.
* @see MyersDiff#INSTANCE * @see HistogramDiff
*/ */
public void setDiffAlgorithm(DiffAlgorithm alg) { public void setDiffAlgorithm(DiffAlgorithm alg) {
diffAlgorithm = alg; diffAlgorithm = alg;