Here's what I found out last night.

Steve suggested using "real" Emacs. Hey, Steve: What's your time output?  I
downloaded Emacs-universal, It has no ESS built in. Bummer. I took
Emacs-Modified for Mac on Prof Goulet's website, which appears to start
from same Emacs and add the useful stuff.

I want to force full output, so I add the options line in this test
function:

set.seed(23456)
y <-  lapply(1:50000, function(x) paste0(letters[1:(rpois(1, 10))],
collapse=""))
options("max.print" = 50000)
system.time(print(y))

I started the test, watched Emacs scroll for a while, went and took a long
shower, watched a quarter of the Chiefs-Chargers football game, then
watched Emacs.app some more.

## [[49999]]
## [1] "abcdef"

## [[50000]]
## [1] "abcdefghijklmnopq"

##     user   system  elapsed
##    0.336    0.308 3532.239

OMG.  Look how huge elapsed is, while user and system are still super small.

Lets see about the font lock hypothesis.  How to turn off FontLock? No menu
for that anymore? How unhandy! I made an init.el file

(setq ess-eval-visibly-p nil)
(global-font-lock-mode 0)

That speeds this up quite a bit.

[[50000]]
[1] "abcdefghijklmnopq"

   user  system elapsed
  0.338   0.305  75.610
>

In a Mac Terminal, I find I can run R CMD BATCH. Here's the time on that,
for comparison:

[[50000]]
[1] "abcdefghijklmnopq"

   user  system elapsed
  0.468   0.389   0.856
>

FAST!

I got an email suggesting "How about RStudio?"

[49999]]
[1] "abcdef"

[[50000]]
[1] "abcdefghijklmnopq"

user  system elapsed
2.540   0.103   2.529

I was surprised how fast that is. There's no colored syntax. But I can
scroll up and down the whole output frame without any fight. However, ...

I just noticed something.  The ESS *R* process is running in its own frame,
it is laboring to re-draw the whole screen each time a line is added.  IT
should cheat.  When R says to ESS "here comes 50000 lines", the *R* buffer
should throw out, say, lines 10000-10200, 20000-20200, 30000-30200, etc. Is
it possible to fill up the buffer without re-drawing the whole window one
line at a time?

I wish I had a slow motion camera to see that Rstudio is doing to make this
work. I think they are not drawing the whole screen each time. There's
probably an app for that.

pj

>  ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>



-- 
Paul E. Johnson
Professor, Political Science      Assoc. Director
1541 Lilac Lane, Room 504      Center for Research Methods
University of Kansas                 University of Kansas
http://pj.freefaculty.org               http://quant.ku.edu

	[[alternative HTML version deleted]]

