From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Tangling takes long - profiling and calling R Date: Tue, 16 Jun 2015 12:34:42 +0200 Message-ID: References: <87ioaobvl1.fsf@selenimh.access.network> 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]:33571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4oLY-0008V9-Cm for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 06:44:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4oCc-00057D-5U for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 06:35:16 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:36814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4oCb-000578-UB for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 06:34:46 -0400 Received: by wgzl5 with SMTP id l5so8952522wgz.3 for ; Tue, 16 Jun 2015 03:34:45 -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 ej5sm987517wjd.22.2015.06.16.03.34.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2015 03:34:44 -0700 (PDT) In-Reply-To: <87ioaobvl1.fsf@selenimh.access.network> (Nicolas Goaziou's message of "Mon, 15 Jun 2015 21:49:46 +0200") 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 Nicolas Goaziou writes: > Hello, > > Rainer M Krug writes: > >> 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 this function, there is > > ;; DEPRECATED header arguments specified as separate property at > ;; point of definition > (let (val sym) > (org-babel-parse-multiple-vars > (delq nil > (mapcar > (lambda (header-arg) > (and (setq val (org-entry-get (point) header-arg t)) > (cons (intern (concat ":" header-arg)) > (org-babel-read val)))) > (mapcar > #'symbol-name > (mapcar > #'car > (org-babel-combine-header-arg-lists > org-babel-common-header-args-w-values > (progn > (setq sym (intern (concat "org-babel-header-args:" lang))) > (and (boundp sym) (eval sym)))))))))) > > While the 3 `mapcar' calls could be turned into a single one, I wonder > if this snippet could be removed altogether instead. It has been > deprecated for 2 years already. > > WDYT? I would not remove it as even I have some org files using them - shame on me. But what about making it user configurable? a variable ~org-babel-tangle-use-deprecated-header-args~ which if set to non-nil would enable this additional code, if nil it would be skipped? The default should be set to ~t~ to be backward compatible. Cheers, Rainer > > Regards, =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 iQEcBAEBCAAGBQJVf/vCAAoJENvXNx4PUvmC5P8H/A5o026qxdcfgVZ5pwy+GeX/ Pg6sjBncabN93anKxUNd4r+nYWZnzsNSmbKSObhUA+K1ETdc1Xl37cPK4dpnnPXe TvTYmSTKTQ5zTTOovCQlKkkOyL5hNbP9sCp/hJSj90Dn+lL72YRKt9JLSq0DHZZd q23b8XEDfwyAtnTdoy804kX0s9uQgJHsHYv9tX8SEPHUiMgwGwx0YuMetW6olfXG zxc0H8tBQaZHkxSvh2ciWDHfxtRKigHSDScNCeJMLDzH6JgNMs1neB18n7J8dsIo wnhSrKt3uL4OOPvANySFENGZkqigBDdSJPgJWPUIw7elB6O3zdsae7Fjt+s/rJ4= =XU8/ -----END PGP SIGNATURE----- --=-=-=--