You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: