]> git.eshelyaron.com Git - emacs.git/commit
Speed up Eshell smart display module
authorMorgan Smith <Morgan.J.Smith@outlook.com>
Wed, 7 Sep 2022 01:18:51 +0000 (21:18 -0400)
committerJim Porter <jporterbugs@gmail.com>
Sat, 28 Oct 2023 22:46:08 +0000 (15:46 -0700)
commite08238cdd74719d4cd99cf5a4f743eb8c6d1d251
tree2342e11a14c5befeb975071ed600f35685ddd234
parent72d040ce7db94979dd2baa951919478faef928a0
Speed up Eshell smart display module

em-smart was forcibly re-displaying the screen upwards of 500 times
per screen of output.  This caused the Eshell to feel quite slow when
the module was in use.  By using fewer hooks and never explicitly
calling 'redisplay' (which was unnecessary) the performance issues go
away (bug#57367).

lisp/eshell/em-smart.el:

(em-smart-unload-hook, eshell-smart-unload-hook): Remove
'eshell-smart-scroll' instead of the now deleted
'eshell-refresh-windows'.

(eshell-smart-displayed, eshell-currently-handling-window)
(eshell-refresh-windows): Delete.

(eshell-smart-scroll-window): Rename to 'eshell-smart-scroll-windows'
and add a bunch of logic originally from 'eshell-refresh-windows'.

(eshell-smart-initialize): Don't add a hook onto
'window-scroll-functions'.  Replace 'eshell-refresh-windows' with
'eshell-smart-scroll-windows'.

(eshell-smart-display-setup): Don't refresh windows.

(eshell-smart-redisplay): Rename to 'eshell-smart-scroll'.  Delete
'eobp' case.
lisp/eshell/em-smart.el