From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Tangling takes long - profiling and calling R Date: Mon, 15 Jun 2015 10:39:13 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4PvS-00006h-BU for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 04:39:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4PvO-0004zZ-9i for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 04:39:26 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:38744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4PvO-0004zU-0N for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 04:39:22 -0400 Received: by wibdq8 with SMTP id dq8so69954115wib.1 for ; Mon, 15 Jun 2015 01:39:21 -0700 (PDT) Received: from Rainers-MacBook-Pro.local (arn78-1-88-186-171-7.fbx.proxad.net. [88.186.171.7]) by mx.google.com with ESMTPSA id n8sm14710955wiy.19.2015.06.15.01.39.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 01:39:20 -0700 (PDT) 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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi I have a relatively large file with about 200 =3Dsource 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/plotwpLELFitLi= stParDistr.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? Version info: ,---- | Org-mode version 8.3beta (release_8.3beta-1209-gc532ff @ /Users/rainerkru= g/.emacs.d/org-mode/lisp/) | GNU Emacs 24.5.1 (x86_64-apple-darwin14.3.0, Carbon Version 157 AppKit 13= 47.57) of 2015-04-13 on Rainers-MacBook-Pro.local `---- Cheers, Rainer ,---- | - time-execute 4950 84% | - call-interactively 4950 84% | - org-babel-tangle 4828 82% | - org-babel-tangle-collect-blocks 2728 46% | - org-babel-tangle-single-block 1363 23% | - org-babel-get-src-block-info 1304 22% | - org-babel-parse-src-block-match 1210 20% |### - org-babel-params-from-properties 1193 20% | + mapcar 1144 19% | + org-entry-get 33 0% | + org-babel-parse-header-arguments 12 0% | + org-babel-combine-header-arg-lists 4 0% | + org-babel-parse-header-arguments 3 0% | + apply 2 0% | generate-new-buffer 1 0% | + org-unescape-code-in-string 1 0% | byte-code 1 0% | + org-babel-generate-file-param 86 1% | + org-babel-process-params 2 0% | org-babel-where-is-src-block-head 1 0% | + org-store-link 36 0% | line-number-at-pos 17 0% | + byte-code 2 0% | generate-new-buffer 1 0% | - org-babel-get-src-block-info 1334 22% | - org-babel-parse-src-block-match 1235 21% |#### - org-babel-params-from-properties 1212 20% | + mapcar 1163 19% | + org-entry-get 30 0% | + org-babel-parse-header-arguments 12 0% | + org-babel-combine-header-arg-lists 7 0% | + org-babel-parse-header-arguments 7 0% | + apply 4 0% | + org-unescape-code-in-string 2 0% | generate-new-buffer 1 0% | + org-babel-generate-file-param 89 1% | org-babel-where-is-src-block-head 2 0% | + org-in-commented-heading-p 8 0% | + org-babel-active-location-p 4 0% | + byte-code 2 0% | + mapc 2098 35% | + run-hooks 1 0% | + smex 122 2% | + ... 912 15% | + flyspell-post-command-hook 4 0% | + redisplay_internal (C function) 3 0% | + timer-event-handler 3 0% `---- =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2 iQEcBAEBCAAGBQJVfo81AAoJENvXNx4PUvmCAKEIAK2W4Cx/bhqg5gnTaxBjj12q 3tv2hIYfiQrRLnSYPZfKjKK3xkweni8vXsz74uZAvpWgOXBHO88hfiU4tZVX/098 WAoc7tCa3bj3B/8CV2JDpJicPdenCSAzfyBbGROS7FK/a6NaO53DEFgBDX6DNpah YJspSS42z01Z6WwMNtDxBC9DKVLQPzGySE7OqmdCUnOuVZtaAXWYPSYCG4Z9rP47 1rj2ubB0nZ7wCsE8KB67VqCI0On61LxSYfpkzcD1PnyB7LSfSId9t2kKqlD4BT8V 3m1d6jJwiVHjq1M555K+a1gLmsO8Mmnk6ZP8PeHP6cntaJMc2zl5LNJ7ZwJn7aE= =/e15 -----END PGP SIGNATURE----- --=-=-=--