[ESS-bugs] ess-mode 15.09-1 [elpa: 20151013.1025]; iESS Performance Degrades Quickly with Buffer Size
Martin Maechler
maechler at stat.math.ethz.ch
Wed Oct 14 16:55:42 CEST 2015
>>>>> Jason Morgan <jason.w.morgan at gmail.com>
>>>>> on Wed, 14 Oct 2015 09:46:58 -0400 writes:
> On Wed, Oct 14, 2015 at 6:16 AM, Martin Maechler
> <maechler at stat.math.ethz.ch> wrote:
>>
>>> I have just updated to ESS 15.09-1 and I am noticing a
>>> dramatic change in performance. For example, if I print
>>> a large-ish data.frame or matrix, the iESS process
>>> becomes very sluggish, almost unusable. I have
>>> replicated the problem when starting emacs with -q (and
>>> then manually loading ESS). I thought it may have
>>> something to do with Ubuntu or GTK, so I also replicated
>>> the problem from the command line (outside of the
>>> windowing system). The problem is easily replicated on
>>> my system: all I have to do is run something like
>>> matrix(rnorm(1e4)). Then, every time I do anything in
>>> the iESS instance, the emacs usage spikes to 25-35%
>>> CPU. Even simply hitting Enter causes a lag and CPU
>>> spike. I am on Emacs 24.4.1, but have replicated on
>>> Emacs 24.3.
>>
>> Interesting.
>>
>> Did you try ESS 15.09 before that ?
>>
>> Honestly, I also had doubts yesterday when working with
>> the latest ESS version (i.e., 15.09-1) and saw extreme
>> slowness myself.
> Thank you for the quick response.
> I didn't install 15.09 until 15.09-1 was out. I was still
> on 14.11, I believe. I am willing to try to find the
> problem, but I'll need guidance on how to profile, etc.
Actually, I just tried myself, also with 15.09, and
very embarrassingly:
Houston, we'got a problem !
Try our old ESS internal (ess/etc/slow-long-output.R) :
### Example modified from Paul Johnson's post to ESS-help, Nov.25, 2013
op <- options("max.print")
##' construct (random) character vector of length n, of about 10 characters each
mkCh <- function(n) {
if(getOption("max.print") <= n) options(max.print = n + 1) ## <-
if(n == 10) stop("error's message with apostrophe - work's in developer mode")
N <- pmin(26,pmax(1, rpois(n, 10)))
cbind(vapply(N, function(m) paste(sample(letters, m), collapse=""), ""))
}
set.seed(1)
y <- mkCh(9999)
system.time(print(y))
## which in current ESS 15.09-1 took about 13 seconds for me,
but only less 1.9 secondes in ESS 14.09
Or the *much* more extreme (for ESS 15.09-1):
set.seed(23456)
y <- mkCh(50000)
system.time(print(y))
## which basically freezes emacs after printing an initial part
--> so we are back at the very bad behavior Vitalie may
remember we had in Decemeber 2013
ESS-core members: do look at
https://stat.ethz.ch/mailman/private/ess-core/2013/007622.html
----
So indeed, Jason, we have a big problem, already in the release
ESS 15.09.
Thanks a lot for your report!
Martin
More information about the ESS-bugs
mailing list