Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really rough performance sometimes and a suggestion #77

Open
quicknir opened this issue Feb 2, 2018 · 1 comment
Open

Really rough performance sometimes and a suggestion #77

quicknir opened this issue Feb 2, 2018 · 1 comment

Comments

@quicknir
Copy link

quicknir commented Feb 2, 2018

Some major modes that have really intensive hooks can cause performance in evil-mc to get really rough. For instance, cc-mode has some pretty aggressive things in before-change-functions, and after-change-functions. When you create 10 cursors, each time you press a key, every function in both of these lists is executed 10 times. As well, post-self-insert-hook is yet another example of this (it all adds up).

You can actually inhibit the first two hooks by setting inhibit-modification-hooks. The last could also be inhibited simply by doing a (let ((post-self-insert-hook nil)) ...). I assume that evil-mc somewhere simply implements a loop over all the cursors, passing the input to all of them. Surpressing all these hooks during that loop, and simply calling them each once, would make them executed far less and vastly improve performance.

@gabesoft
Copy link
Owner

gabesoft commented Feb 5, 2018

Thanks for the suggestion. I'll look into inhibiting some of the hooks when I get a chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants