emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tangling takes long - profiling and calling R
@ 2015-06-15  8:39 Rainer M Krug
  2015-06-15  8:42 ` Rainer M Krug
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Rainer M Krug @ 2015-06-15  8:39 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 5418 bytes --]

Hi

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 addition to this, I observed there is some interaction with ESS when
tangling, which in my understanding is not necessary. I get messages
like

,----
| ...
| Wrote /Users/rainerkrug/Documents/Projects/EnergyBalance/.Rbuildignore
| Wrote /Users/rainerkrug/Documents/Projects/EnergyBalance/tests/wpLELTest.R
| You are developing: (EnergyBalance)
| Wrote /Users/rainerkrug/Documents/Projects/EnergyBalance/R/plotwpLELFitListParDistr.R
| You are developing: (EnergyBalance)
| ...
`----

where the messages "You are developing: (EnergyBalance)" come from
ESS. Is this to be expected that R is called for some blocks, but not
for others, when tangling?

Version info:
,----
| Org-mode version 8.3beta (release_8.3beta-1209-gc532ff @ /Users/rainerkrug/.emacs.d/org-mode/lisp/)
| GNU Emacs 24.5.1 (x86_64-apple-darwin14.3.0, Carbon Version 157 AppKit 1347.57) of 2015-04-13 on Rainers-MacBook-Pro.local
`----

Cheers,

Rainer

,----
| - time-execute                                                4950  84%
|  - call-interactively                                            4950  84%
|   - org-babel-tangle                                             4828  82%
|    - org-babel-tangle-collect-blocks                             2728  46%
|     - org-babel-tangle-single-block                              1363  23%
|      - org-babel-get-src-block-info                              1304  22%
|       - org-babel-parse-src-block-match                          1210  20%
|###     - org-babel-params-from-properties                        1193  20%
|         + mapcar                                                 1144  19%
|         + org-entry-get                                            33   0%
|         + org-babel-parse-header-arguments                         12   0%
|         + org-babel-combine-header-arg-lists                        4   0%
|        + org-babel-parse-header-arguments                           3   0%
|        + apply                                                      2   0%
|          generate-new-buffer                                        1   0%
|        + org-unescape-code-in-string                                1   0%
|          byte-code                                                  1   0%
|       + org-babel-generate-file-param                              86   1%
|       + org-babel-process-params                                    2   0%
|         org-babel-where-is-src-block-head                           1   0%
|      + org-store-link                                              36   0%
|        line-number-at-pos                                          17   0%
|      + byte-code                                                    2   0%
|        generate-new-buffer                                          1   0%
|     - org-babel-get-src-block-info                               1334  22%
|      - org-babel-parse-src-block-match                           1235  21%
|####   - org-babel-params-from-properties                         1212  20%
|        + mapcar                                                  1163  19%
|        + org-entry-get                                             30   0%
|        + org-babel-parse-header-arguments                          12   0%
|        + org-babel-combine-header-arg-lists                         7   0%
|       + org-babel-parse-header-arguments                            7   0%
|       + apply                                                       4   0%
|       + org-unescape-code-in-string                                 2   0%
|         generate-new-buffer                                         1   0%
|      + org-babel-generate-file-param                               89   1%
|        org-babel-where-is-src-block-head                            2   0%
|     + org-in-commented-heading-p                                    8   0%
|     + org-babel-active-location-p                                   4   0%
|     + byte-code                                                     2   0%
|    + mapc                                                        2098  35%
|    + run-hooks                                                      1   0%
|   + smex                                                          122   2%
| + ...                                                             912  15%
| + flyspell-post-command-hook                                        4   0%
| + redisplay_internal (C function)                                   3   0%
| + timer-event-handler                                               3   0%
`----


-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 480 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2015-07-03 13:42 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).