[ESS] emacs freezing on computationally intensive commands

A.J. Rossini blindglobe at gmail.com
Tue Apr 19 20:16:23 CEST 2005


It's "hack advice" -- I have to admit that I've used it for nearly a
decade, though.

To solve the help-files problem, I run a second R process and map
files to use it, or do the inverse and dump long-running processes to
the second process.  If you are wild and crazy, you run one for the
minimum of the number of long-running processes and fast machines you
can reach via ssh.    Why do you think we left it (multi-processing)
in :-)?

More importantly, we ought to provide helper functions to make this
simple, I guess.  But you have to watch out for confusion, since you
can't get help without load libraries, so the trick only works if
you've loaded the same libraries in both R subprocesses.

We ought to provide a utility for auto-batching as well, but that's
another feature.

best,
-tony

On 4/19/05, Kasper Daniel Hansen <k.hansen at biostat.ku.dk> wrote:
> Hmm, I must say I use it constantly with very good results, and this was
> the approach I was adviced to take when I asked a similiar question some
> time ago on the list.
> 
> Anyway, I think it is pretty important for users to be able to edit
> files while R computes in another buffer (it would even be nice to
> continue to view help files, hint hint :) While I always use batch mode
> for long computations (1+ hour) I frequently execute commands with a
> moderate amount of computing (10-40 minutes).
> 
> Kasper
> 
> On Tue, Apr 19, 2005 at 07:18:44PM +0200, A.J. Rossini wrote:
> > The problem with your approach, Kasper, is that sometimes it stops the
> > whole process.
> > I suspect it is something to do with detecting output, and we probably
> > could "fake" it within ESS.  We'll take a look.
> >
> > best,
> > -tony
> >
> >
> > On 4/19/05, Kasper Daniel Hansen <k.hansen at biostat.ku.dk> wrote:
> > > If you press C-g Emacs will "unfreeze" so you can go on editing in
> > > another buffer. Note that the R process is still occupied, so you
> > > cannot use the help function while editing (you will get an
> > > error/warning like "Waiting for ESS(R)"). But C-g will solve most of
> > > your problems.
> > >
> > > Kasper
> > >
> > > On Tue, Apr 19, 2005 at 05:18:02PM +0200, Henning Redestig wrote:
> > > > Hi,
> > > >
> > > > When I in my R-buffer call a function that takes long time to finish my
> > > > Emacs freezes up until that command is finished. I thought that was
> > > > natural until I realized that if the first thing that the R function
> > > > does is outputting something to my R-buffer say: cat("Starting
> > > > function\n") then this causes Emacs to wake up again, being usable while
> > > > the R process finishes off in the background.
> > > >
> > > > Is there are a way to achieve the same thing except the silly approach
> > > > of putting such a line in the top of all functions?
> > > >
> > > > I use Emacs 21.3.1, ESS 5.2.5, R-2.0.1 on Fedora
> > > >
> > > > Cheers for any help on this..
> > > >
> > > > /Henning
> > > >
> > > > ______________________________________________
> > > > ESS-help at stat.math.ethz.ch mailing list
> > > > https://stat.ethz.ch/mailman/listinfo/ess-help
> > >
> > > --
> > > Kasper Daniel Hansen, Research Assistant
> > > Department of Biostatistics, University of Copenhagen
> > >
> > > ______________________________________________
> > > ESS-help at stat.math.ethz.ch mailing list
> > > https://stat.ethz.ch/mailman/listinfo/ess-help
> > >
> >
> >
> > --
> > best,
> > -tony
> >
> > "Commit early,commit often, and commit in a repository from which we can easily
> > roll-back your mistakes" (AJR, 4Jan05).
> >
> > A.J. Rossini
> > blindglobe at gmail.com
> 
> --
> Kasper Daniel Hansen, Research Assistant
> Department of Biostatistics, University of Copenhagen
> 
> 


-- 
best,
-tony

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

A.J. Rossini
blindglobe at gmail.com




More information about the ESS-help mailing list