From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Mitchell Subject: Re: Exporting large documents Date: Mon, 29 Apr 2013 17:04:23 +0100 Message-ID: <8761z5gw6w.fsf@gmx.li> References: <877gjnojsq.fsf@Rainer.invalid> <5654CA29-5F6D-4E8B-8B8B-C3609D76D189@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWqZA-0007cG-06 for emacs-orgmode@gnu.org; Mon, 29 Apr 2013 12:04:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWqZ7-0001pP-Mt for emacs-orgmode@gnu.org; Mon, 29 Apr 2013 12:04:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:42776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWqZ7-0001pH-GF for emacs-orgmode@gnu.org; Mon, 29 Apr 2013 12:04:33 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UWqZ2-0006bN-8n for emacs-orgmode@gnu.org; Mon, 29 Apr 2013 18:04:28 +0200 Received: from e4300lm.epcc.ed.ac.uk ([129.215.63.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Apr 2013 18:04:28 +0200 Received: from wence by e4300lm.epcc.ed.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Apr 2013 18:04:28 +0200 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: emacs-orgmode@gnu.org 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