0

Emacs scrolling is lagging for me on Linux but not on macOS. I'm using Ubuntu 20 and also tried Solus but behavior is the same. Faster system helps but not enough. What so special about emacs build on macOS? Can I achieve this on Linux? I'm using touchpad with high scrolling speed.

Edit: Emacs version: GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10)
With emacs -q there is no lag.
(setq fast-but-imprecise-scrolling t) difference is not noticeable.
Disabling highlight line mode helps.
Very strange that scrolling down is better than scrolling up.

Edit: I had to remove anything that operates during scrolling like highlight line, symbol under cursor and custom modeline. Emacs profiler helped to find those.

3
  • Does this setting help any?: (setq fast-but-imprecise-scrolling t) "When non-nil, accelerate scrolling operations. This comes into play when scrolling rapidly over previously unfontified buffer regions. Only those portions of the buffer which are actually going to be displayed get fontified. Note that this optimization can cause the portion of the buffer displayed after a scrolling operation to be somewhat inaccurate." – lawlist Nov 25 '20 at 20:41
  • I do not know if the following makes a difference between macOS and Linux, but I can tell you that as of 09/28/2018 (7946445962372c4255180af45cb7c857f1b0b5fa), the Emacs NS port (OSX / macOS) is no longer able to update the glass during update_window when redisplay occurs -- updating the glass now occurs when the OS calls drawRect, which in turn triggers expose_frame. The primary maintainer of the NS port on Emacs Devel (Alan T.) may have implemented some additional workarounds for the inability to update the glass during update_window, which may account for differences observed ... – lawlist Nov 25 '20 at 20:49
  • Could also be some fancy things in your modeline. – jue Nov 26 '20 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.