Issue #268 resolved

evil-resize-window is slow

Scott Determan avatarScott Determan created an issue

Commands like c-w_ and c-w| seem to take a very long time. I looked at the code and the function evil-resize-window is coded in a way that calls enlarge-window (or shrink-window) once for every requested size delta. I'm sure there is a reason it is coded this way, but it makes commands c-w_ uncomfortably slow.

In my local version, I changed this function so it calls enlarge-window once for a requested delta. With this chance c-w_ and c-w| are much faster.

Comments (3)

  1. Frank Fischer

    Improve performance of evil-resize-window (fix #268)

    In Emacs <= 23 the function enlarge-window may delete other windows. Because of this evil-resize-window changed the size of a window in steps of one, checking whether the window configuration changed. This may be very inefficient.

    In Emacs 24 enlarge-window does not delete other windows anymore, so we can use this function directly. In Emacs 23 we use inhibit-redisplay to prevent Emacs from redisplaying during the resizing process, which should improve the performance.

    → <<cset 8f3a5f66ffa6>>

  2. Frank Fischer

    The reason for this was the strange behaviour of enlarge-window in Emacs 23 to possibly delete other windows. It would be nice if you could check if the performance problem still occurs in Emacs 23, too.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.