From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Tangling takes long - profiling and calling R Date: Mon, 15 Jun 2015 21:49:46 +0200 Message-ID: <87ioaobvl1.fsf@selenimh.access.network> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aMs-00070E-0i for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 15:48:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4aMq-0004TT-Vx for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 15:48:25 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:45980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4aMq-0004Rf-Pn for emacs-orgmode@gnu.org; Mon, 15 Jun 2015 15:48:24 -0400 In-Reply-To: (Rainer M. Krug's message of "Mon, 15 Jun 2015 10:39:13 +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: Rainer M Krug Cc: emacs-orgmode@gnu.org Hello, Rainer M Krug writes: > 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 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? Regards, -- Nicolas Goaziou