From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Tangling takes long - profiling and calling R Date: Mon, 15 Jun 2015 11:52:55 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ZVI-0003Wi-3U for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 14:53:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4ZVD-0005R9-0R for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 14:53:04 -0400 Received: from iport-acv2-out.ucsd.edu ([132.239.0.174]:11454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ZVC-0005QP-O5 for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 14:52:58 -0400 In-Reply-To: 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: Rainer M Krug Cc: emacs-orgmode@gnu.org On Mon, 15 Jun 2015, Rainer M Krug wrote: > Hi > > I have a relatively large file with > about 200 =source blocks (R) to be tangled to get an R package. But the > tangling takes about 20 seconds. > > Profiling the tangling showed that the call to ~mapcar~ in > ~org-babel-params-from-properties~ takes about 40% of the execution time > (see profiler excerpt below). Is there anything one can do to make this > faster? > > In addition to this, I observed there is some interaction with ESS when > tangling, which in my understanding is not necessary. I get messages > like > > ,---- > | ... > | Wrote /Users/rainerkrug/Documents/Projects/EnergyBalance/.Rbuildignore > | Wrote /Users/rainerkrug/Documents/Projects/EnergyBalance/tests/wpLELTest.R > | You are developing: (EnergyBalance) > | Wrote /Users/rainerkrug/Documents/Projects/EnergyBalance/R/plotwpLELFitListParDistr.R > | You are developing: (EnergyBalance) > | ... > `---- > > where the messages "You are developing: (EnergyBalance)" come from > ESS. Is this to be expected that R is called for some blocks, but not > for others, when tangling? The major mode is invoked when tangling, if possible. This enables comments to be rendered. See the docstring for `org-babel-spec-to-string'. HTH, Chuck