[ESS] any way to speed up Emacs\ESS?
Kasper Daniel Hansen
khansen at stat.berkeley.edu
Mon Feb 16 06:22:29 CET 2009
(setq ess-eval-visibly-p nil)
in your .emacs for letting this be the default behaviour
On Feb 15, 2009, at 17:32 , G. Jay Kerns wrote:
> Dear Chuck,
> Wow! That was exactly what I was looking for. Thank you very much.
> On Sun, Feb 15, 2009 at 8:14 PM, Charles C. Berry <cberry at tajo.ucsd.edu
> > wrote:
>> On Sun, 15 Feb 2009, G. Jay Kerns wrote:
>>> Dear ESS-help,
>>> I like Emacs/ESS very much, and have used it on and off for a year
>>> now. I have tried lots of things, looking for the "best" (whatever
>>> that means). I keep coming back to Emacs/ESS, partly because I like
>>> its philosophy, and partly for its sheer power. I am this moment
>>> on a
>>> laptop with 32-bit Ubuntu Intrepid; I am using GNU-Emacs 22.2-0 and
>>> ESS 5.13-11.
>>> Consider the following example code, just for the sake of
>>> x <- rnorm(100)
>>> y <- rnorm(100)
>>> x + y
>>> If I put this in a frame "scratch.R" and send it to the [*R*] buffer
>>> with Eval region, it takes approx 1.5 seconds on my system before
>>> everything is done and the "Finished evaluation" message appears.
>>> takes around the same amount of time if I yank the above text into
>>> [*R*] buffer and press RET.
>>> On the other hand, I can copy-paste the same code into a terminal
>>> it finishes instantaneously (well, before my finger leaves Ctrl
>>> +v). I
>>> get similar speed with Sciviews-K, for instance.
>>> Now, the other merits of Emacs/ESS are more than enough to
>>> outweigh a
>>> few seconds here and there, but the waiting time seems to be
>>> proportional to the script length, and I am wondering: is there
>>> trick, or something I can put in my .emacs (for example), or some
>>> other way to streamline things to make these evaluations faster?
>> Does this help?
>> C-h v ess-eval-region RET
>> ess-eval-region is an interactive Lisp function in `ess-
>> (ess-eval-region START END TOGGLE &optional MESSAGE)
>> Send the current region to the inferior ESS process.
>> With prefix argument toggle the meaning of `ess-eval-visibly-
>> this does not apply when using the S-plus GUI, see
>> 'Nother words try selecting a region, then sending
>> C-u C-c C-r
>> (assuming standard bindings)
>> and see what you get.
>> On my Windows XP PC, selecting all of a *.R file and doing that is
>> ever so
>> slightly longer than source("that.file.R") and about 70 times
>> faster than
>> plain old C-c C-r.
>> It does echo some prompts (and this is version 5.3.8 in case this
>> is different now) , but if you can live with that, this might do.
>>> I did some quick searching on Google, the ESS manual, etc, and
>>> see anything immediately relevant. If it can't be fixed, that's
>>> but if there is something I am missing I would really appreciate
>>> BTW: I did see the below thread, and even tried it out, but it
>>> seem to work for me.
>>> G. Jay Kerns, Ph.D.
>>> Associate Professor
>>> Department of Mathematics & Statistics
>>> Youngstown State University
>>> Youngstown, OH 44555-0002 USA
>>> Office: 1035 Cushwa Hall
>>> Phone: (330) 941-3310 Office (voice mail)
>>> -3302 Department
>>> -3170 FAX
>>> E-mail: gkerns at ysu.edu
>>> ESS-help at stat.math.ethz.ch mailing list
>> Charles C. Berry (858) 534-2098
>> Dept of Family/Preventive
>> E mailto:cberry at tajo.ucsd.edu UC San Diego
>> http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego
> G. Jay Kerns, Ph.D.
> Associate Professor
> Department of Mathematics & Statistics
> Youngstown State University
> Youngstown, OH 44555-0002 USA
> Office: 1035 Cushwa Hall
> Phone: (330) 941-3310 Office (voice mail)
> -3302 Department
> -3170 FAX
> E-mail: gkerns at ysu.edu
> ESS-help at stat.math.ethz.ch mailing list
More information about the ESS-help