From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: Bug? R: Org babel block execution *drastically* slower than in ESS session directly Date: Tue, 13 Nov 2012 22:27:44 -0500 Message-ID: <87d2zgrhhr.fsf@gmail.com> References: <874nlappb1.fsf@tajo.ucsd.edu> <878vam1jvh.fsf@tajo.ucsd.edu> <3477.1351723988@alphaville> <11876.1351784283@alphaville> <14621.1351795682@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYTdo-0005so-8o for emacs-orgmode@gnu.org; Tue, 13 Nov 2012 22:27:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYTdl-0003bx-6V for emacs-orgmode@gnu.org; Tue, 13 Nov 2012 22:27:52 -0500 Received: from mail-vc0-f169.google.com ([209.85.220.169]:41731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYTdl-0003bt-1t for emacs-orgmode@gnu.org; Tue, 13 Nov 2012 22:27:49 -0500 Received: by mail-vc0-f169.google.com with SMTP id fl17so9657604vcb.0 for ; Tue, 13 Nov 2012 19:27:48 -0800 (PST) In-Reply-To: <14621.1351795682@alphaville> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com, John Hendy Cc: cberry@tajo.ucsd.edu, emacs-orgmode@gnu.org I just ran into this problem. It is caused by the calls to =E2=80=98org-babel-import-elisp-from-file=E2=80=99 on lines 310 and 343 of = =E2=80=98ob-R.el=E2=80=99 (for non-session and session code blocks respectively). I determined this by setting =E2=80=98debug-on-quit=E2=80=99 to t in Emacs, then hitting= C-g when cpu usage spiked, and examining the backtrace. It seems like Emacs tries to read in the last value of the R command, to print it in the minibuffer. It gets bogged down doing so. As a stopgap, putting NULL as the last line of the source block fixes the problem (the value =E2=80=9Creturned=E2=80=9D by the block is just NULL). = I believe setting =E2=80=9C:results output=E2=80=9D (as opposed to =E2=80=9Cvalue=E2= =80=9D) would also make the bug disappear, since the output will be very small. This is likely what made cberry=E2=80=99s test differ from John=E2=80=99s. I=E2=80=99m not sure what the right strategy would be for a fix. Two ideas would be: 1) adding a sanity check to o-b-import-elisp-from-file, which asks the user whether to really import very large files (or just ignores such files) 2) adding a new :results handling header arg =E2=80=9Creally-silent=E2=80= =9D (probably with a better name...) that discards the result entirely, not even printing it to the minibuffer. --=20 Aaron Ecay