emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tangling takes long - profiling and calling R


From: Nicolas Goaziou
Subject: Re: [O] Tangling takes long - profiling and calling R
Date: Mon, 15 Jun 2015 21:49:46 +0200

Hello,

Rainer M Krug <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]