[ESS] Tips for preventing slowing down?

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Wed Nov 13 21:14:10 CET 2019


Thanks a lot Bill.

I've observed the same... and so have others,  often very experienced R users.

One thing some of us found was that  'flymake' was very harmful in
these situations,  so we have turned it off (or tried to ...)
completely.
But I have to acknowledge that it does not solve the problem in some cases:
https://github.com/emacs-ess/ESS/issues/490#issuecomment-538682487
-->    (setq ess-use-flymake nil)

Relatedly maybe (or not), I tend to have a suspicion that the "newish"
ESS behavior of  "taking over" your default directory, and adapting
behavior of  emacs *shell*   is also harmful, notably when that
*shell* buffer also becomes 10000s of lines long.

On Wed, Nov 13, 2019 at 5:28 PM William Denton via ESS-help
<ess-help using r-project.org> wrote:
>
> 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
> that?
>
> Thanks,
>
> Bill
> --
> 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/
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



-- 
Martin <Maechler using stat.math.ethz.ch>  https://stat.ethz.ch/~maechler
Seminar für Statistik, ETH Zürich  HG G 16      Rämistrasse 101
CH-8092 Zurich, SWITZERLAND
phone: +41-44-632-3408       fax: ...-1228      <><



More information about the ESS-help mailing list