[ESS] Tips for preventing slowing down?

William Denton wtd @end|ng |rom pobox@com
Wed Nov 13 17:28:13 CET 2019

I'm finding that large ESS buffers, where I've been running a lot of commands, 
really slow down Emacs.  I use R a lot in Org, so when I'm working on something 
I'm running little R code blocks over and over, and then regenerating the entire 
document by running all the commands.

After a while, the ESS buffer gets large, and things get slow.  I mean really 
slow, to where keystrokes get missed because of the lag.  I thought it might be 
swiper and ivy, so I disabled them, but the problem still happens.  Running R 
at the command line doesn't lead to slowdown.

I ran the profiler while I spent fifteen minutes or so in Org and ESS running R 
commands, and the highlights are this:

- timer-event-handler                                           15189  34%
    cancel-timer-internal                                         8411  19%

- command-execute                                               14995  34%
  - call-interactively                                           14995  34%
   - funcall-interactively                                        8411  19%
    + org-export-dispatch                                         3822   8%
    + org-ctrl-c-ctrl-c                                           3702   8%
   - byte-code                                                    6583  15%
    + read-extended-command                                       6583  15%

- ...                                                           12560  28%
    Automatic GC                                                 12552  28%

I don't know what to make of this, though, or if there's anything there that 
might indicate what I should do.  Do others have the same experience that large 
ESS buffers slow down Emacs?  Is there any advice about what might help stop 


William Denton :: Toronto, Canada   ---   Listening to Art: https://listeningtoart.org/
https://www.miskatonic.org/         ---   GHG.EARTH: https://ghg.earth/
Caveat lector.                      ---   STAPLR: https://staplr.org/

More information about the ESS-help mailing list