Reading and evaluating multi-line commands in ESS is extremely slow on my
system. (Windows XP (32-bit); R 2.8.0; ESS 5.3.8)

For example (with an R process already running):

(progn
  (set-buffer (get-buffer-create "foo"))
  (erase-buffer)
  (insert
"c(\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n)")
;100 lines
  (list
   (current-time-string)
   (ess-eval-region (point-min) (point-max) nil) ; why is 3rd arg not
optional?
   (current-time-string)))

reports

("Thu Jan 08 19:54:53 2009" (1 104) "Thu Jan 08 19:55:04 2009")

That's 11 seconds!  The same command with spaces (even 100000 spaces!)
instead of newlines is instantaneous.

The same thing happens if I paste the same 100-line command into the *R*
buffer and hit RET.

How can I fix this or work around it?

Thanks,

             -s

	[[alternative HTML version deleted]]


