emacs-evil / emacs-evil/evil

Block visual insert performance

Open
#685 2 comments 0 reactions 0 assignees View on GitHub
bug major
Dominant language
Emacs Lisp
Stars
3.9k
Forks
307
PR merge metrics
No merged PRs in 30d

Description

Originally reported by: **Anonymous**

----------------------------------------

There are issues with block visual insert performance. In particular, it seems (though I don't have direct proof) that hooks for things are being run many many times. That means that you can have certain things installed that while relatively heavy give reasonable performance in normal usage, but when combined with block visual end up causing a long delay because the hooks are being run many many times. An example of something like that is line numbering.

I encountered this issue in spacemacs, here's the link: https://github.com/syl20bnr/spacemacs/issues/5423. With line numbering active, block inserting into a 100 rows could easily give a delay of a couple of seconds.

It seems like emacs perhaps provides ways to avoid running hooks during an automated sequence of edits: https://www.gnu.org/software/emacs/manual/html_node/elisp/Change-Hooks.html.

Is it reasonable to change how hooks are being run during block visual inserts?

----------------------------------------
- Bitbucket: https://bitbucket.org/lyro/evil/issue/685

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Reproduce block visual insertion with line numbering enabled, trace whether change hooks run repeatedly, and read the linked Emacs Change Hooks documentation; done means the cause and an agreed approach to the reported delay are established without breaking hook behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp
Domain
performance, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.