Giter Site home page Giter Site logo

Comments (3)

nightwing avatar nightwing commented on July 29, 2024

Currently we rely on maximum call stack size exceptions, so @A repeats the macro 512 times.

Unfortunately performance of the extension on v6 is worse than v5, so repeating macro 500 times takes about a minute.
Aside from fixing performance issue, should we also always prevent macro recursion, or can that be useful in some situations and keeping behavior from https://codemirror.net/5/demo/vim.html is ok?

from codemirror-vim.

veluca93 avatar veluca93 commented on July 29, 2024

I admit I didn't expect that repeating the macro 500 times would lock up the page this badly :-)

I can't at the moment think of a usecase where macro recursion would be useful, but IMO it's best to stick to the vim behaviour if possible (i e. Allow recursion)

from codemirror-vim.

Opisek avatar Opisek commented on July 29, 2024

For the case of tail-recursion, so playing the macro at the end of recording, we could avoid using a call stack entirely. This would also extend to mutually-recursive recordings like qa@bqqb@aq.

If the recursive call takes place in the middle of a recording then it's down to classic optimizations.

from codemirror-vim.

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.