-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Visual block mode multi-insert is slow #5423
Comments
With stock emacs with just evil loaded this is fast, so there is probably something to improve there. |
Thanks. Were you also able to reproduce the slowdown? |
Yep |
Wow.. stock emacs with evil is even much faster than vim for this operation! In the meantime I found out that it is at least partially caused by the line numbers. Disabling line numbers (SPC t n) makes it much faster. |
Oh, I tried without line numbers, and indeed with them it's even more slower. |
I can't reproduce it. Enable to profiler to see what's the culprit. |
It seems to be mostly due to Of course line numbers are destroying performances, but this is nothing new here. Without line numbers:
With line numbers:
|
Currently for me, this is still very slow. From what I can see, a huge amount of time is being spent in smart parens, although even when I disabled it it still seemed to be spending time there. It looks like block visual is actually inserting and running the hooks over, and over, and over. Can't it be treated as a single raw insert? Edit: so for me, turning off both smart parens and line numbers gives acceptable performance. But it seems like a shame to have to turn these off. Isn't there some way to just prevent them running during this repetitive command? Should I ask the evil people if it's possible to have a separate set of hooks, say "run-repetitive-hooks" and "run-hooks"? Or can we just remove things by hand each time block visual insert is entered and re-add them at the end? Edit2: maybe this is of interested: https://www.gnu.org/software/emacs/manual/html_node/elisp/Change-Hooks.html. Seems like emacs provides a way to do a bunch of edits and only run hooks once. |
For me it's flyspell mode.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
Description
Inserting in visual block mode is very slow compared to vim. It gets even worse when files are larger and insert is repeated.
Reproduction guide
Observed behaviour:
Inserts 32x on each of the 30 subsequent lines. Takes multiple seconds and gets worse on larger files.
Expected behaviour:
Same. However, vim is significantly faster (<1 sec).
Is there anything we can do to improve the situation?
Is the overhead for operations like this so much higher for spacemacs, evil or even just for emacs?
System Info
The text was updated successfully, but these errors were encountered: