[ESS] Tips for preventing slowing down?
m@rc_@chw@rtz @end|ng |rom me@com
Wed Nov 13 22:04:56 CET 2019
To throw out one, potentially arcane possibility, in addition to Martin's comment below.
Check your .emacs file for the following entry:
This is to display line numbers in the buffer frame, in addition to the mode line, if used.
With Emacs 26.x, this should not be used, rather you should use:
My recollection is that when I made the switch to Emacs 26 last year, I still had the former entry in my .emacs file.
I had noted the progression of a slowdown with large buffers, both in terms of general scrolling, as well as during the Sweave related processing of a large .Rnw file.
The latter entry is part of Emacs 26.x, whereas the former goes back to circa Emacs 22/23, I believe. The position of the line numbers in the buffer frame is also different now, than with the prior linum mode.
Through a lot of trial and error, I found this to be the etiology of my slow scrolling behavior and I am back to a speedy Emacs, even with files of 10s of thousands of lines. There was some conflict between the older linum mode and Emacs 26.x.
> On Nov 13, 2019, at 3:14 PM, Martin Maechler via ESS-help <ess-help using r-project.org> wrote:
> 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 ...)
> But I have to acknowledge that it does not solve the problem in some cases:
> --> (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
More information about the ESS-help