I edited the subject to be more concise/clear.

I let orgmode chug away on reading in some ~10-30mb csv files for nearly
30min. I finally gave up with Ctrl + g. Out of curiosity, I copied my babel
block code (four simple lines in the form of `var <- read.csv("./file.csv",
header = T, sep = ",")` into the ESS session already started by my first
block execution, and it finished in less than 10 seconds.

Something seems seriously wrong with however org + babel is executing. I'm
suspicious of it printing the output to the minibuffer. I have about 200^2
- 400^2 lines in the csv files. Was shocked that I'd been waiting for org
this whole time and could have just run the code in the ESS R session
directly in a minuscule fraction of the time.

I could post a reproducible csv file if others would like to try this?

I tried the following to make sure it wasn't my setup:

1) from terminal: `emacs -Q --load=~/Desktop/basic-config`, where
basic-config contains:

;; set load paths
;; set load dirs and global config options
(add-to-list 'load-path "~/.elisp/site-lisp/")
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp/")
(add-to-list 'load-path "~/.elisp/org.git/lisp/")
(add-to-list 'load-path "~/.elisp/site-lisp/ess/lisp/")

;; setup org
(require 'org-install)

;; setup babel languages
(require 'ess-site)
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)))

2) Created a simple org file:

----------
* headline

#+begin_src R :session r :results silent
data <-
read.csv("/media/vault/misc/benefit-plan-analysis/2012/contour_table.csv")
#+end_src
----------

3) Run =C-c C-c YES RET= on block

4) Change to R session and enter the same line manually.

The results are unbelievably different. I didn't let the org session finish
as once it took longer than 30sec I figured I'd get the same results as
with my actual file in this example. Changing to the R session and it was
done in less than 5sec with a ~70mb csv.

Any suggestions on troubleshooting this?


Best regards,
John

On Tue, Oct 30, 2012 at 2:46 AM, John Hendy <jw.he...@gmail.com> wrote:

> I'm working with a large dataset. I try to minimize overhead by doing
> some bigger data rearranging and calculations in a single block that I
> execute once per session and then switch :eval to "no."
>
> This block is set with :results silent, but I know with this option
> the results are still printed to the minibuffer. Usually this isn't a
> problem, but I've had some hangs with emacs and started wondering if
> this could be due to Orgmode regurgitating the results. Could this be
> the case? If so, could Org be made to stop this behavior?
>
> If I accidentally type the name of a data frame in the R session
> buffer, even when I use C-c C-c  to stop the print out, it still takes
> quite a while to catch up and stop itself. It made me wonder if trying
> to print all of those results is increasing my compilation times
> unnecessarily.
>
>
> Thanks for any thoughts,
> John
>

Reply via email to