Code Monkey home page Code Monkey logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
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

  • Added labels: ****
  • Removed labels: ****

from google-diff-match-patch.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 25, 2024
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 [email protected] on 26 Aug 2010 at 4:12

  • Changed state: Duplicate
  • Added labels: ****
  • Removed labels: ****

from google-diff-match-patch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.