[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Tangling takes long - profiling and calling R
From: |
Rainer M Krug |
Subject: |
Re: [O] Tangling takes long - profiling and calling R |
Date: |
Tue, 16 Jun 2015 12:34:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
Nicolas Goaziou <address@hidden> writes:
> 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?
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,
--
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: address@hidden
Skype: RMkrug
PGP: 0x0F52F982
signature.asc
Description: PGP signature
- [O] Tangling takes long - profiling and calling R, Rainer M Krug, 2015/06/15
- Re: [O] Tangling takes long - profiling and calling R, Rainer M Krug, 2015/06/15
- Re: [O] Tangling takes long - profiling and calling R, Charles C. Berry, 2015/06/15
- Re: [O] Tangling takes long - profiling and calling R, Nicolas Goaziou, 2015/06/15
- Re: [O] Tangling takes long - profiling and calling R,
Rainer M Krug <=
- Re: [O] Tangling takes long - profiling and calling R, Rainer M Krug, 2015/06/16
- Re: [O] Tangling takes long - profiling and calling R, Nicolas Goaziou, 2015/06/16
- [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R, Rainer M Krug, 2015/06/17
- Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R, Nicolas Goaziou, 2015/06/18
- Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R, Rainer M Krug, 2015/06/18
- Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R, Nicolas Goaziou, 2015/06/18