emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Rainer M Krug <Rainer@krugs.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Tangling takes long - profiling and calling R
Date: Mon, 15 Jun 2015 21:49:46 +0200	[thread overview]
Message-ID: <87ioaobvl1.fsf@selenimh.access.network> (raw)
In-Reply-To: <m2a8w12wni.fsf@krugs.de> (Rainer M. Krug's message of "Mon, 15 Jun 2015 10:39:13 +0200")

Hello,

Rainer M Krug <Rainer@krugs.de> 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

  parent reply	other threads:[~2015-06-15 19:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15  8:39 Tangling takes long - profiling and calling R Rainer M Krug
2015-06-15  8:42 ` Rainer M Krug
2015-06-15 18:52 ` Charles C. Berry
2015-06-16 10:29   ` Rainer M Krug
2015-06-15 19:49 ` Nicolas Goaziou [this message]
2015-06-16 10:34   ` Rainer M Krug
2015-06-16 11:46     ` Nicolas Goaziou
2015-06-16 12:45       ` Sebastien Vauban
2015-06-16 13:04         ` Nicolas Goaziou
2015-06-16 14:47         ` Rainer M Krug
2015-07-01 14:03           ` Aaron Ecay
2015-07-02 11:51             ` Nicolas Goaziou
2015-07-02 12:52               ` Rainer M Krug
2015-07-02 16:35                 ` Aaron Ecay
2015-07-02 18:21                   ` Sebastien Vauban
2015-07-02 18:44                     ` Rainer M Krug
2015-07-02 18:43                   ` Rainer M Krug
2015-07-02 16:11               ` Aaron Ecay
2015-07-03 13:43                 ` Nicolas Goaziou
2015-07-02 18:51               ` Rainer M Krug
2015-06-16 14:42       ` Rainer M Krug
2015-06-16 21:45         ` Nicolas Goaziou
2015-06-17  7:16           ` org version numbers in file - WAS: " Rainer M Krug
2015-06-18  8:13             ` Nicolas Goaziou
2015-06-18 13:25               ` Rainer M Krug
2015-06-18 13:50                 ` Nicolas Goaziou
2015-06-23  9:04                   ` Rainer M Krug
2015-06-18 14:23                 ` Detlef Steuer
2015-06-23  8:45                   ` Rainer M Krug
2015-06-23  9:32                     ` Detlef Steuer
2015-06-23 10:57                       ` Rainer M Krug

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ioaobvl1.fsf@selenimh.access.network \
    --to=mail@nicolasgoaziou.fr \
    --cc=Rainer@krugs.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).