GithubHelp home page GithubHelp logo

Comments (7)

rtfpessoa avatar rtfpessoa commented on May 17, 2024

@escitalopram I did some debugging and the Rematch.distance(amod, bmod) algorithm is taking too long, and maybe getting an infinite loop or something.
Do you have any idea?

from diff2html.

escitalopram avatar escitalopram commented on May 17, 2024

I'll have a look

from diff2html.

escitalopram avatar escitalopram commented on May 17, 2024

The problem seems to be triggered by large blocks of changes, like OASIS.csproj having 2,2k lines added and removed in one block. The algorithm is O(nm) time with n lines added and m lines removed in a single block, starting almost 5 million levenshtein distance calculations, which are in turn O(op) time with o,p being the line lengths. I'd suggest we'll just disable the line matching on blocks larger than say n*m=2500 (and maybe make that limit configurable).

The memory hunger will probably go away with that, too, because there is some cache for distance function results. If that isn't enough, maybe I could also introduce some hash function for the cache keys.

from diff2html.

rtfpessoa avatar rtfpessoa commented on May 17, 2024

I think that is a great idea. Can you make a PR?

from diff2html.

escitalopram avatar escitalopram commented on May 17, 2024

Which branch should I base it on?

from diff2html.

rtfpessoa avatar rtfpessoa commented on May 17, 2024

master

from diff2html.

rtfpessoa avatar rtfpessoa commented on May 17, 2024

Fixed by #68 in release 2.0.0-beta10

from diff2html.

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.