[ESS] [R] CPU usage on Windows

A.J. Rossini blindglobe at gmail.com
Mon Mar 19 11:21:19 CET 2007


Typical unhelpful comment from Duncan, which has nothing to do with
the topic except to demonstrate yet again his bigotries.

Anyway, there is nothing related to DDE with R -- there is with older
versions of S-PLUS.

It's strictly an issue with the mis-design of R under Windows, though
there are reasonable justifications for that mis-design, having to
deal with a mis-designed OS in the first place.

All Emacs is doing is waiting for text to be generated by the process
it's controlling (in this case, the R subprocess).  For all versions
of R, Emacs/ESS is simply just a text processor; there is nothing
fancy going on.

But this is apparently only an issue for ESS and ESS-core to solve, as
part of R-core supporting Microsoft has decided that it's not their
bug, it's a feature.

Having said that, I'm not sure when it'll be looked into (resourcing
issue, not a desire issue).   But we should be looking into it, as
I've seen the behavour before.

On 3/19/07, Frede Aakmann Tøgersen <FredeA.Togersen at agrsci.dk> wrote:
> (cc'ing ESS mailing list to which this belongs)
>
> I have been using Emacs, ESS, and R on Windows for several years now. It works all together to allmost full satisfaction. Thanks to all people providing these tools.
>
> I haven't noticed this specific problem, but I guess it is related to what I see from time to time when using R, Emacs and ESS to do graphics. I am not really into all the details to how Emacs and R communicates through ESS (using ddeclinet) but here is something that perhaps can provide useful information to more skilled persons.
>
> I think it has to do with the way that R og Emacs communicates through ddeclient. Normally Emacs waits for R to finish by looking for the next command prompt from R indicating that R is finished with the commands submitted to R by Emacs/ESS. This means that Emacs can be busy waiting for R to finish which is most noticeable when submitting chunks of commands using e.g. C-c C-r (submit a region). Emacs/ESS then waits for R to finish each command in the region waiting for a signal on a clear command prompt before submitting the next command. This can be overriden by using C-c A-r (A = meta (unix) or Alt (windows)).
>
> What I have noticed is that when I have made a plot and R creates the graphics windows. Then R og and the graphics windows from time to time hang (not being updated) when I want to focus on the graphics window (to put in front) subsequently. In this situation it helps to go to the buffer with the inferior ESS process and do a carriage return, which immediately frees the graphics windows and now it is getting updated when put in front.
>
> This behaviour which I believe is due to the way that Emacs and R communicates over ddeclient is not persistent and until now I have hesitated to report it because I couldn't provide a small reproducable example. I have noticed this over several versions of Emacs (21.2 - 22.1), ESS (< 5 - 5.4) and Windows 98/NT/XP.
>
>
> Frede Aakmann Tøgersen
> Forsker / Scientist
>
>
>
>         AARHUS UNIVERSITET / UNIVERSITY OF AARHUS
> Det Jordbrugsvidenskabelige Fakultet / Faculty of Agricultural Sciences
> Forskningscenter Foulum / Research Centre Foulum
> Genetik og Bioteknologi / Dept. of Genetics and Biotechnology
> Blichers Allé 20, P.O. BOX 50
> DK-8830 Tjele
>
> Tel:     +45 8999 1900
> Direct:  +45 8999 1878
> Mobile:  +45
> E-mail:  FredeA.Togersen at agrsci.dk <mailto:FredeA.Togersen at agrsci.dk>
> Web:     www.agrsci.dk <https://djfpost.agrsci.dk/exchweb/bin/redir.asp?URL=http://www.agrsci.dk/>
>
> ________________________________
>
> Fra: r-help-bounces at stat.math.ethz.ch på vegne af Duncan Murdoch
> Sendt: lø 17-03-2007 00:37
> Til: Jonathan Wang
> Cc: r-help at stat.math.ethz.ch
> Emne: Re: [R] CPU usage on Windows
>
>
>
> On 3/16/2007 6:56 PM, Jonathan Wang wrote:
> > I'm using R with emacs & ESS on Windows. When I create a plot, sometimes R
> > will seem to get stuck in a busy loop, i.e. it will use 100% of my CPU.
> > However the system is still somewhat responsive, and the problem usually
> > goes away if I create a new device with windows(). If I then close this
> > device, making the first device active again, sometimes R will get stuck in
> > the busy loop again.
> >
> > Has anybody heard of this behavior, or, better yet, have a solution?
>
> I've heard of a number of problems with Emacs on Windows.  I wouldn't
> recommend using it.  As far as I can see, it makes a number of
> assumptions about the OS that just aren't true about Windows.
>
> If you can reproduce the behaviour outside of Emacs, I'll investigate.
>
> Duncan Murdoch
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>


-- 
best,
-tony

blindglobe at gmail.com
Muttenz, Switzerland.
"Commit early,commit often, and commit in a repository from which we
can easily roll-back your mistakes" (AJR, 4Jan05).




More information about the ESS-help mailing list