Giter Club home page Giter Club logo

Comments (6)

tmhedberg avatar tmhedberg commented on July 19, 2024

Thanks for the report.

Is there any chance you could provide a copy of the file in question (or a similar one that also takes a long time to load)? I don't have any Python files of that size, so it's difficult to analyze the performance of the folding algorithm on that scale.

It may be that the algorithm I'm using simply doesn't perform well past a certain buffer size. If that's the case, there may not be much that can be done about it without rethinking the entire approach. That said, if you can provide an example, I can at least take a look and see if there's any low-hanging fruit to be picked performance-wise.

from simpylfold.

tmhedberg avatar tmhedberg commented on July 19, 2024

After giving it a little more thought, there is one fairly obvious optimization I can try, that of memoizing the results of recursive calls to the s:NumContainingDefs function. I suspect that that could improve performance substantially on large buffers.

When I get a chance, I'll put together a patch. And again, if you can supply an example file, that would be quite helpful.

from simpylfold.

kennethkoontz avatar kennethkoontz commented on July 19, 2024

I sent a file to your email address.

from simpylfold.

tmhedberg avatar tmhedberg commented on July 19, 2024

I just pushed an optimization that improves performance when loading your example file by about 3-4 times on my machine. It's not instantaneous, but it's far more tolerable than it was. Let me know how it works for you.

from simpylfold.

kennethkoontz avatar kennethkoontz commented on July 19, 2024

Thanks. Will check it out.

from simpylfold.

kennethkoontz avatar kennethkoontz commented on July 19, 2024

Its bearable. Thanks for the patch.

from simpylfold.

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.