emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 8.3 export slower
@ 2015-08-24 19:12 Samuel Wales
  2015-08-24 21:02 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2015-08-24 19:12 UTC (permalink / raw)
  To: emacs-orgmode

i didn't benchmark, but export of a 900 word subtree seems to take 15s
in 8.3 (1-2s before 8.3):

- command-execute                                               14966  95%
 - call-interactively                                           14966  95%
  - org-export-dispatch                                         14633  93%
   - #<lambda 0x3a8ec5b2d3fa3ab8>                               14600  93%
    - org-ascii-export-to-ascii                                 14600  93%
     - org-export-to-file                                       14600  93%
      - org-export-as                                           14600  93%
       - org-export-get-environment                              6493  41%
        - org-id-find                                            6441  41%
         - org-id-update-id-locations                            6236  39%
          - org-get-agenda-file-buffer                           6020  38%
           - find-file-noselect                                  6016  38%
            - find-file-noselect-1                               6012  38%
             - after-find-file                                   5960  38%
              - normal-mode                                      5956  37%
               - funcall                                         5956  37%
                - #<compiled 0x229789>                           5956  37%
                 - set-auto-mode                                 5956  37%
                  - set-auto-mode-0                              3788  24%
                   - org-mode                                    3788  24%
                    - org-set-startup-visibility                 3660  23%
                     - org-cycle-hide-drawers                    3168  20%
                      + org-element-at-point                     2004  12%
                      + org-flag-drawer                           356   2%
                     + org-overview                               272   1%
                       org-set-visibility-according-to-property
         20   0%
                     + org-cycle-hide-archived-subtrees                  8   0%
                    + org-set-regexps-and-options                  32   0%
                    + run-mode-hooks                               28   0%
                    + org-refresh-effort-properties                 24   0%
                      org-update-radio-target-regexp                 24   0%
                    + org-macro-initialize-templates                 20   0%
                  + funcall                                      2164  13%
                  + set-auto-mode-1                                 4   0%
              + run-hooks                                           4   0%
             + funcall                                             52   0%
            + create-file-buffer                                    4   0%
           + org-find-base-buffer-visiting                          4   0%
          + org-agenda-files                                       52   0%
          + file-truename                                           4   0%
            org-release-buffers                                     4   0%
         + org-id-find-id-in-file                                 201   1%
        + org-export--get-inbuffer-options                         12   0%
        + org-element-context                                      12   0%
       - run-hook-with-args                                      5332  34%
        - mymy-org-export-par-in-inline-fn                       5332  34%
         - org-footnote-normalize                                5328  33%
          - org-footnote-get-definition                          3816  24%
           - byte-code                                           3816  24%
            - org-element-context                                  28   0%
             + byte-code                                           28   0%
          + org-footnote-delete-definitions                       976   6%
          + org-fill-paragraph                                    312   1%
          + org-footnote-get-next-reference                       168   1%
          + jit-lock-after-change                                  16   0%
            mapconcat                                               4   0%
       + org-export--merge-external-footnote-definitions               1703  10%
       + org-export--delete-comments                              860   5%
         org-update-radio-target-regexp                            60   0%
       + org-set-regexps-and-options                               48   0%
       + org-export-execute-babel-code                             28   0%
       + org-macro-initialize-templates                            20   0%
       + org-export-data                                           16   0%
       + org-element-parse-buffer                                  12   0%
       + org-export-copy-buffer                                     8   0%
         org-element-normalize-string                               4   0%
       + org-ascii-inner-template                                   4   0%
   + org-export--dispatch-ui                                       33   0%
  + ido-hacks-execute-extended-command                            308   1%
  + next-line                                                      19   0%
  + profiler-report-toggle-entry                                    3   0%
  + previous-line                                                   3   0%
+ ...                                                             366   2%
+ redisplay_internal (C function)                                 297   1%
+ rcirc-filter                                                     45   0%
+ timer-event-handler                                               6   0%

i do not know why it is searching 20 files for org id's, as there are
no id links.

the thing i am doing different from emacs -Q is this, which
nicolas suggested, but seems no longer to work in 8.3:

      (add-hook 'org-export-before-parsing-hook
'mymy-org-export-par-in-inline-fn)
      (defun mymy-org-export-par-in-inline-fn (backend)
        "Accept multiple inline footnote paragraphs."
        (unless (org-export-derived-backend-p backend 'latex)
          (org-footnote-normalize)
          ;; =alpha i guess it sticks \par in there for you
          (while (re-search-forward "\\\\par\\s-*" nil t)
            (replace-match "\n\n"))))


thanks.

samuel

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

* Re: 8.3 export slower
  2015-08-24 19:12 8.3 export slower Samuel Wales
@ 2015-08-24 21:02 ` Nicolas Goaziou
  2015-09-11  4:43   ` Samuel Wales
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2015-08-24 21:02 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hello,

Samuel Wales <samologist@gmail.com> writes:

> i didn't benchmark, but export of a 900 word subtree seems to take 15s
> in 8.3 (1-2s before 8.3):

Could you use `elp-instrument-package' with an uncompiled Org and report
results?

> i do not know why it is searching 20 files for org id's, as there are
> no id links.

If you do not have any [[id:...]] links, it should certainly not use
`org-id' at all. Do you have an ECM?

> the thing i am doing different from emacs -Q is this, which
> nicolas suggested, but seems no longer to work in 8.3:
>
>       (add-hook 'org-export-before-parsing-hook
> 'mymy-org-export-par-in-inline-fn)
>       (defun mymy-org-export-par-in-inline-fn (backend)
>         "Accept multiple inline footnote paragraphs."
>         (unless (org-export-derived-backend-p backend 'latex)
>           (org-footnote-normalize)
>           ;; =alpha i guess it sticks \par in there for you
>           (while (re-search-forward "\\\\par\\s-*" nil t)
>             (replace-match "\n\n"))))

What doesn't work?


Regards,

-- 
Nicolas Goaziou

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

* Re: 8.3 export slower
  2015-08-24 21:02 ` Nicolas Goaziou
@ 2015-09-11  4:43   ` Samuel Wales
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2015-09-11  4:43 UTC (permalink / raw)
  To: Samuel Wales, emacs-orgmode

i can't reproduce it with emacs -Q, so it's in my .emacs.  i just have
no idea where.

so this is just for your amusement, because you probably cannot
reproduce.  this is for a few words.  but i am not doing anything
unusual with org-id.

*** results
org-id-find                                                   20
   18.077497969  0.9038748984
org-id-update-id-locations                                    1
   17.854783606  17.854783606
org-get-agenda-file-buffer                                    49
   17.605115604  0.3592880735
org-mode                                                      13
   17.428635418  1.3406642629
org-set-startup-visibility                                    11
   17.121193636  1.5564721488
org-cycle-hide-drawers                                        23
   16.077266353  0.6990115805
org-element-at-point                                          12001
   13.088680722  0.0010906325
org-element--parse-to                                         11833
   12.523564197  0.0010583591
org-element--current-element                                  35531
   10.130136793  0.0002851069
org-footnote-normalize                                        1
   5.959322785   5.959322785
org-footnote-get-definition                                   48
   3.9111094069  0.0814814459
org-element-property-drawer-parser                            7145
   2.6707914329  0.0003737986
org-flag-drawer                                               9309
   2.6655245710  0.0002863384
org-element-planning-parser                                   9284
   1.7952934540  0.0001933749
org-element-drawer-parser                                     3346
   1.2326732149  0.0003684020
org-footnote-delete-definitions                               48
   0.9939735049  0.0207077813
org-overview                                                  11
   0.961028694   0.0873662449
org-element-timestamp-parser                                  9823
   0.8357421970  8.508...e-05
org-get-limited-outline-regexp                                71018
   0.8239894830  1.160...e-05
org-fill-paragraph                                            177
   0.8197804559  0.0046315279
alpha-org-reveal-for-undo                                     22
   0.7295873749  0.0331630625
alpha-hide-parent                                             3
   0.567039799   0.1890132663
org-element-paragraph-parser                                  12003
   0.5159867560  4.298...e-05
org-outline-level                                             20729
   0.4586724599  2.212...e-05
org-at-heading-p                                              66601
   0.3856126059  5.789...e-06
org-adaptive-fill-function                                    336
   0.232086043   0.0006907322
org-id-find-id-in-file                                        21
   0.2224568350  0.0105931826
org-find-entry-with-id                                        21
   0.213860245   0.0101838211
org-find-property                                             21
   0.213718174   0.0101770559
org-activate-plain-links                                      118
   0.2099725420  0.0017794283
org-footnote-get-next-reference                               252
   0.1910038770  0.0007579518
org-footnote-in-valid-context-p                               343
   0.169593156   0.0004944406
org-show-set-visibility                                       4
   0.1677224849  0.0419306212
org-footnote-at-reference-p                                   304
   0.1608443360  0.0005290932
org-element--list-struct                                      404
   0.1596180470  0.0003950941
org-update-radio-target-regexp                                16
   0.1281589859  0.0080099366
org-in-block-p                                                343
   0.1258276640  0.0003668445
org-set-regexps-and-options                                   16
   0.119842746   0.0074901716
org-element--collect-affiliated-keywords                      18861
   0.1176091759  6.235...e-06
org-between-regexps-p                                         2744
   0.0933698270  3.402...e-05
org--setup-collect-keywords                                   16
   0.082724238   0.0051702648
org-end-of-subtree                                            185
   0.0818963809  0.0004426831
org-element-context                                           53
   0.0816504910  0.0015405753
org-macro-initialize-templates                                14
   0.0689903680  0.0049278834
org-macro--collect-macros                                     14
   0.0680260889  0.0048590063
org-parse-time-string                                         9823
   0.0611306300  6.223...e-06
org-agenda-files                                              14
   0.054981705   0.0039272646
org-set-visibility-according-to-property                      11
   0.0528645579  0.0048058689
org-babel-hide-all-hashes                                     11
   0.0506967199  0.0046087927
org-element-comment-parser                                    1939
   0.0412671079  2.128...e-05
org-refresh-effort-properties                                 11
   0.038696597   0.0035178724
org-refresh-properties                                        11
   0.0386185749  0.0035107795
org-in-regexp                                                 3896
   0.0383195089  9.835...e-06
org-footnote-at-definition-p                                  39
   0.0360806979  0.0009251461
org-cycle-hide-archived-subtrees                              14
   0.026620903   0.0019014930
org-hide-archived-subtrees                                    13
   0.0263013330  0.0020231794
org-element-property                                          29431
   0.0212234299  7.211...e-07
org-inside-LaTeX-fragment-p                                   343
   0.0207557409  6.051...e-05
org-element--cache-put                                        35548
   0.0202629959  5.700...e-07
org-element-headline-parser                                   170
   0.0198569789  0.0001168057
org-find-base-buffer-visiting                                 49
   0.017108962   0.0003491624
org-item-re                                                   12785
   0.0164513129  1.286...e-06
org-element-keyword-parser                                    599
   0.0155454209  2.595...e-05
org-self-insert-command                                       80
   0.015536808   0.0001942100
org-at-property-p                                             22
   0.0154749770  0.0007034080
org-element-plain-list-parser                                 412
   0.0126123569  3.061...e-05
org-get-property-block                                        32
   0.012371198   0.0003865999
org-in-verbatim-emphasis                                      343
   0.0118898650  3.466...e-05
org-element-type                                              19525
   0.0112747479  5.774...e-07
org-id-locations-save                                         1
   0.010991233   0.010991233
org-element-quote-block-parser                                391
   0.0080607729  2.061...e-05
org-back-to-heading                                           297
   0.0075443519  2.540...e-05
org-element-item-parser                                       194
   0.0072477949  3.735...e-05
org-reveal                                                    1
   0.005386785   0.005386785
org-show-siblings                                             1
   0.005324525   0.005324525
org-fill-paragraph-with-timestamp-nobreak-p                   448
   0.0053062790  1.184...e-05
org-goto-sibling                                              4
   0.005277717   0.0013194292
org-install-agenda-files-menu                                 13
   0.0044973029  0.0003459463
org-cycle                                                     3
   0.0044637370  0.0014879123
org-trim                                                      215
   0.0044192339  2.055...e-05
org-make-options-regexp                                       16
   0.004306311   0.0002691444
org-cycle-show-empty-lines                                    14
   0.0042892100  0.0003063721
org-element-footnote-definition-parser                        144
   0.0041011     2.847...e-05
org-before-first-heading-p                                    44
   0.003951103   8.979...e-05
org-inside-latex-macro-p                                      251
   0.0038592330  1.537...e-05
org-at-timestamp-p                                            448
   0.003466253   7.737...e-06
org-babel-hide-hash                                           8
   0.0033203590  0.0004150448
org-at-comment-p                                              343
   0.0032287150  9.413...e-06
org-cycle-internal-local                                      3
   0.003151534   0.0010505113
org-release-buffers                                           1
   0.003019063   0.003019063
org-before-change-function                                    4256
   0.0029270460  6.877...e-07
org-do-emphasis-faces                                         118
   0.0028452040  2.411...e-05
org-element--object-lex                                       46
   0.0028062369  6.100...e-05
org-element--parse-elements                                   6
   0.002676338   0.0004460563
org-at-table-p                                                87
   0.0025483280  2.929...e-05
org-extract-log-state-settings                                880
   0.0025302749  2.875...e-06
org-activate-footnote-links                                   118
   0.0025112199  2.128...e-05
org-fix-tags-on-the-fly                                       80
   0.0024702179  3.087...e-05
org-fontify-meta-lines-and-blocks                             118
   0.0023632720  2.002...e-05
org-unfontify-region                                          118
   0.0021675510  1.836...e-05
org-return                                                    4
   0.002127731   0.0005319327
org-meta-return                                               3
   0.0019827350  0.0006609116
org-footnote-next-reference-or-definition                     118
   0.001897771   1.608...e-05
org-insert-heading                                            3
   0.001791102   0.000597034
org-fill-line-break-nobreak-p                                 448
   0.0017466329  3.898...e-06
org-activate-tags                                             118
   0.0017210319  1.458...e-05

> the thing i am doing different from emacs -Q is this, which
> nicolas suggested, but seems no longer to work in 8.3:
>
>       (add-hook 'org-export-before-parsing-hook
> 'mymy-org-export-par-in-inline-fn)
>       (defun mymy-org-export-par-in-inline-fn (backend)
>         "Accept multiple inline footnote paragraphs."
>         (unless (org-export-derived-backend-p backend 'latex)
>           (org-footnote-normalize)
>           ;; =alpha i guess it sticks \par in there for you
>           (while (re-search-forward "\\\\par\\s-*" nil t)
>             (replace-match "\n\n"))))

i always use inline footnotes.  i use multiple paragraphs in
footnotes.  i use that fragment to make this possible. that fragment
no longer exports inline footnote paragraphs as paragraphs.  they
bunch up into a single paragraph.

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

end of thread, other threads:[~2015-09-11  4:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-24 19:12 8.3 export slower Samuel Wales
2015-08-24 21:02 ` Nicolas Goaziou
2015-09-11  4:43   ` Samuel Wales

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