emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Lawrence Mitchell <wence@gmx.li>
Cc: Nicolas Goaziou <n.goaziou@gmail.com>,
	"emacs-orgmode@gnu.org orgmode" <emacs-orgmode@gnu.org>
Subject: Re: Exporting large documents
Date: Fri, 3 May 2013 10:43:31 +0200	[thread overview]
Message-ID: <707EAAA5-D27C-47B7-9A1E-874C3A375BD9@gmail.com> (raw)
In-Reply-To: <8761z5gw6w.fsf@gmx.li>

Hi Lawrence,

thanks for doing this.  Stuff to think about - but no good
ideas for improvements here either - I am just not familiar enough
with the export engine.  Nicolas, it would be interesting to
hear from you if you have comments and ideas about quadratic
behavior of the exporter, and if you think these are
inevitable.

My guess is that quadratic behavior would mostly result
from searches of the data structure.  From the data you
show it seems that most of the damage is done during
export, not during parsing.

- Carsten

On 29.4.2013, at 18:04, Lawrence Mitchell <wence@gmx.li> wrote:

> Carsten Dominik wrote:
>> Hi Achim,
> 
>> this is an interesting experiment, thank you!
> 
>> I think it would also be interesting to use elp to see which
>> function are taking up the non-linear time.
> 
> I did a bit of digging and here are the results.  No potential
> fixes though.
> 
> Taking the "Introduction" section of orgmanual.org and doubling
> it up so the buffer is 16x, 32x, 64x and 128x copies of the
> introduction and then running latex export having
> elp-instrumented the org package shows the following.
> 
> There are a few instances of quadratic behaviour that contribute
> to the slowdown.
> 
> Main culprit:
> 
> Name times-called cumulative-time time-per-call
> org-export-data 10132 29.364160173 0.0028981603
> org-export-data 20180 90.198301053 0.0044696878
> org-export-data 40276 316.37200089 0.0078550998
> org-export-data 80468 1155.4851323 0.0143595607
> 
> Less important but still a noticeable total runtime:
> 
> org-element-map 1133 2.6814707420 0.0023666996
> org-element-map 2285 10.799367732 0.0047262003
> org-element-map 4589 43.787327887 0.0095418016
> org-element-map 9197 173.27839595 0.0188407519
> 
> org-export-resolve-fuzzy-link 48 2.6659073480 0.0555397364
> org-export-resolve-fuzzy-link 96 10.766515020 0.1121511981
> org-export-resolve-fuzzy-link 192 43.725658059 0.2277378023
> org-export-resolve-fuzzy-link 384 173.15348462 0.4509205328
> 
> org-latex-link 144 2.6730487589 0.0185628386
> org-latex-link 288 10.783675007 0.0374433159
> org-latex-link 576 43.768676906 0.0759872862
> org-latex-link 1152 173.27176368 0.1504095170
> 
> 
> Unimportant but still quadratic:
> 
> org-export-get-headline-number 176 0.0036720380 2.086...e-05
> org-export-get-headline-number 352 0.0154215390 4.381...e-05
> org-export-get-headline-number 704 0.0636496679 9.041...e-05
> org-export-get-headline-number 1408 0.2382477599 0.0001692100
> 
> org-babel-get-inline-src-block-matches 112 0.0174396369 0.0001557110
> org-babel-get-inline-src-block-matches 224 0.0521645539 0.0002328774
> org-babel-get-inline-src-block-matches 448 0.182069907 0.0004064060
> org-babel-get-inline-src-block-matches 896 0.66889546 0.0007465351
> 
> org-babel-remove-result 112 0.0332858050 0.0002971946
> org-babel-remove-result 224 0.0837776260 0.0003740072
> org-babel-remove-result 448 0.2475016210 0.0005524589
> org-babel-remove-result 896 0.8013491290 0.0008943628
> 
> org-babel-where-is-src-block-result 112 0.0320815769 0.0002864426
> org-babel-where-is-src-block-result 224 0.081381881 0.0003633119
> org-babel-where-is-src-block-result 448 0.2425831529 0.0005414802
> org-babel-where-is-src-block-result 896 0.7915090309 0.0008833806
> 
> 
> 
> Cheers,
> 
> Lawrence
> 
> 

  parent reply	other threads:[~2013-05-03  8:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-27 19:28 Exporting large documents Achim Gratz
2013-04-27 19:35 ` Carsten Dominik
2013-04-29 16:04   ` Lawrence Mitchell
2013-04-29 18:44     ` Achim Gratz
2013-05-01 12:18       ` [PATCH] ox: Cache locations of fuzzy links Lawrence Mitchell
2013-05-01 21:46         ` Nicolas Goaziou
2013-05-02  9:03           ` [PATCH v2] " Lawrence Mitchell
2013-05-02 12:35             ` Nicolas Goaziou
2013-05-02 12:53               ` Nicolas Goaziou
2013-05-03  8:43     ` Carsten Dominik [this message]
2013-05-03 11:12       ` Exporting large documents Lawrence Mitchell
     [not found]         ` <877gjfgnl9.fsf@gmail.com>
     [not found]           ` <0F877AB5-D488-4223-B0E7-F11B4B973614@gmail.com>
     [not found]             ` <87ip2xfd0x.fsf@gmail.com>
2013-05-06 11:07               ` Lawrence Mitchell
2013-05-06 16:15                 ` Lawrence Mitchell
2013-05-07 10:26                   ` Bastien
2013-05-06 18:41                 ` Achim Gratz
2013-05-06 19:17                   ` Nicolas Goaziou
2013-05-06 19:32                     ` Achim Gratz
2013-05-07 14:29                       ` Nicolas Goaziou

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=707EAAA5-D27C-47B7-9A1E-874C3A375BD9@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    --cc=wence@gmx.li \
    /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).