From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Exporting large documents Date: Fri, 3 May 2013 10:43:31 +0200 Message-ID: <707EAAA5-D27C-47B7-9A1E-874C3A375BD9@gmail.com> References: <877gjnojsq.fsf@Rainer.invalid> <5654CA29-5F6D-4E8B-8B8B-C3609D76D189@gmail.com> <8761z5gw6w.fsf@gmx.li> Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYBac-0002tZ-MY for emacs-orgmode@gnu.org; Fri, 03 May 2013 04:43:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYBaZ-0008Ug-09 for emacs-orgmode@gnu.org; Fri, 03 May 2013 04:43:38 -0400 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:44767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYBaY-0008UZ-Ov for emacs-orgmode@gnu.org; Fri, 03 May 2013 04:43:34 -0400 Received: by mail-wg0-f48.google.com with SMTP id f11so1361397wgh.27 for ; Fri, 03 May 2013 01:43:33 -0700 (PDT) In-Reply-To: <8761z5gw6w.fsf@gmx.li> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Lawrence Mitchell Cc: Nicolas Goaziou , "emacs-orgmode@gnu.org orgmode" 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 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 > >