emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Very slow performance in Org-mode on 10k line file?
Date: Wed, 7 Aug 2013 18:02:19 -0500	[thread overview]
Message-ID: <CA+M2ft96M6eUmMpWvppq2h3c-8VueSAKZRTt2Srt3=F+7qb45w@mail.gmail.com> (raw)
In-Reply-To: <878v0djfcj.fsf@gmail.com>

Alrighty. Here you are:

#+begin_src minimal emacs (which I've moved to ~/.emacs) and started a
fresh session
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp")
(add-to-list 'load-path "~/.elisp/org.git/lisp/")
#+end_src


Really simple operation, but that's that had huge lag on the 10k file.
All I did was delete a word and re-write it, and then insert a line
above a table ("#+attr_latex: :align llp{7cm}"). Here's the process:

- Start emacs (/usr/bin/emacs)
- Navigate to file (6k ~/org/projects.org file)
- Run: M-x elp-instrument-package [RET] org
- Run: M-x elp-reset-all
- Navigate to the headline I was trying to work on, delete a word a
character at a time, re-type it, add the above latex line above a
table
- Run: M-x elp-results
- Copied 2011 and 2012 journal entries back into projects.org, saved,
quit emacs, and repeated

Results with 6k line file
==========
org-self-insert-command                             41
2.026747151   0.0494328573
org-activate-dates                                  54
0.0175029940  0.0003241295
org-fontify-meta-lines-and-blocks                   161
0.006726777   4.178...e-05
org-fontify-meta-lines-and-blocks-1                 161
0.0047893350  2.974...e-05
org-delete-backward-char                            12
0.002401629   0.0002001357
org-activate-footnote-links                         54
0.002203194   4.079...e-05
org-activate-plain-links                            54
0.0020726379  3.838...e-05
org-unfontify-region                                54
0.0020696900  3.832...e-05
org-at-table-p                                      54
0.0016839339  3.118...e-05
org-footnote-next-reference-or-definition           54
0.0015487719  2.868...e-05
org-do-latex-and-related                            54
0.0014039899  2.599...e-05
org-do-emphasis-faces                               54
0.001028353   1.904...e-05
org-string-nw-p                                     54
0.0008700800  1.611...e-05
org-activate-angle-links                            54
0.0008193899  1.517...e-05
org-return                                          1
0.000758448   0.000758448
org-activate-tags                                   54
0.0005812419  1.076...e-05
org-in-item-p                                       1
0.000436519   0.000436519
org-activate-bracket-links                          54
0.0004324309  8.007...e-06
org-activate-code                                   54
0.000416118   7.705...e-06
org-fix-tags-on-the-fly                             53
0.000332257   6.269e-06
org-font-lock-add-priority-faces                    54
0.0003180110  5.889...e-06
org-string-match-p                                  54
0.000269684   4.994...e-06
org-remove-font-lock-display-properties             54
0.0002692999  4.987...e-06
org-list-context                                    1
0.000268703   0.000268703
org-hide-wide-columns                               54
0.000228154   4.225...e-06
org-before-change-function                          54
0.0001231199  2.279...e-06
org-remove-flyspell-overlays-in                     21
0.0001044190  4.972...e-06
org-font-lock-hook                                  54
8.081...e-05  1.496...e-06
org-check-before-invisible-edit                     53
7.8635e-05    1.483...e-06
org-activate-target-links                           54
7.542...e-05  1.396...e-06
org-fontify-entities                                54
6.752e-05     1.250...e-06
org-raise-scripts                                   54
6.415...e-05  1.188...e-06
org-font-lock-add-tag-faces                         54
5.994...e-05  1.110...e-06
org-in-src-block-p                                  1
5.1549e-05    5.1549e-05
org-in-regexp                                       1
3.4068e-05    3.4068e-05
org-back-to-heading                                 1
3.3785e-05    3.3785e-05
org-get-limited-outline-regexp                      1
2.1714e-05    2.1714e-05
org-at-heading-p                                    1
1.3884e-05    1.3884e-05
org-get-indentation                                 2
1.337...e-05  6.689...e-06
org-item-re                                         1
4.116e-06     4.116e-06
==========



Results with ~10k line file
==========
org-self-insert-command                             39
0.85596741    0.0219478823
org-cycle                                           6
0.107894177   0.0179823628
org-cycle-internal-local                            6
0.1058569380  0.0176428230
org-optimize-window-after-visibility-change         6
0.047916078   0.007986013
org-subtree-end-visible-p                           5
0.046233295   0.009246659
org-end-of-subtree                                  27
0.029686826   0.0010995120
org-outline-level                                   394
0.0162884779  4.134...e-05
org-cycle-show-empty-lines                          6
0.008189213   0.0013648688
org-fontify-meta-lines-and-blocks                   182
0.0078306620  4.302...e-05
org-fontify-meta-lines-and-blocks-1                 182
0.0057315880  3.149...e-05
org-cycle-hide-archived-subtrees                    6
0.005463361   0.0009105601
org-delete-backward-char                            10
0.004027681   0.0004027681
org-activate-plain-links                            79
0.0035584700  4.504...e-05
org-activate-footnote-links                         78
0.0028586259  3.664...e-05
org-unfontify-region                                78
0.0024188670  3.101...e-05
org-do-emphasis-faces                               89
0.002085356   2.343...e-05
org-footnote-next-reference-or-definition           78
0.0020824370  2.669...e-05
org-do-latex-and-related                            78
0.0017855160  2.289...e-05
org-at-table-p                                      56
0.0016877709  3.013...e-05
org-activate-dates                                  106
0.0016536720  1.560...e-05
org-cycle-hide-drawers                              9
0.0016145939  0.0001793993
org-back-to-heading                                 432
0.0015116170  3.499...e-06
org-activate-angle-links                            78
0.001141598   1.463...e-05
org-string-nw-p                                     78
0.0011044000  1.415...e-05
org-activate-tags                                   81
0.0009928790  1.225...e-05
org-return                                          1
0.000793986   0.000793986
org-activate-code                                   78
0.0006506530  8.341...e-06
org-activate-bracket-links                          78
0.00060669    7.778...e-06
org-font-lock-add-priority-faces                    78
0.0004675280  5.993...e-06
org-in-item-p                                       1
0.00044091    0.00044091
org-at-item-p                                       21
0.0004120960  1.962...e-05
org-hide-archived-subtrees                          5
0.0004082699  8.165...e-05
org-string-match-p                                  78
0.0003752040  4.810...e-06
org-remove-font-lock-display-properties             78
0.0003220950  4.129...e-06
org-fix-tags-on-the-fly                             49
0.0003208529  6.548...e-06
org-flag-drawer                                     7
0.0003203140  4.575...e-05
org-hide-wide-columns                               78
0.0002948089  3.779...e-06
org-show-entry                                      3
0.000274877   9.162...e-05
org-list-context                                    1
0.0002685     0.0002685
org-before-first-heading-p                          11
0.0002303880  2.094...e-05
org-hide-block-toggle-maybe                         6
0.0002303300  3.838...e-05
org-cycle-item-indentation                          6
0.0002270370  3.78395e-05
org-remove-flyspell-overlays-in                     53
0.0002091870  3.946...e-06
org-babel-hide-result-toggle-maybe                  6
0.000174206   2.903...e-05
org-get-level-face                                  162
0.0001498009  9.246...e-07
org-before-change-function                          50
0.0001198120  2.396...e-06
org-fontify-entities                                78
0.0001098809  1.408...e-06
org-cycle-level                                     6
0.0001042630  1.737...e-05
org-activate-target-links                           78
0.000101329   1.299...e-06
org-font-lock-hook                                  78
0.0001005800  1.289...e-06
org-flag-subtree                                    1
9.9225e-05    9.9225e-05
org-in-src-block-p                                  2
8.5134e-05    4.2567e-05
org-font-lock-add-tag-faces                         78
8.087...e-05  1.036...e-06
org-item-re                                         23
8.068...e-05  3.508...e-06
org-raise-scripts                                   78
7.867...e-05  1.008...e-06
org-list-search-forward                             1
7.5083e-05    7.5083e-05
org-check-before-invisible-edit                     49
7.2543e-05    1.480...e-06
org-list-search-generic                             1
6.0865e-05    6.0865e-05
org-at-heading-p                                    8
5.9246e-05    7.40575e-06
org-get-limited-outline-regexp                      4
4.654...e-05  1.163...e-05
org-in-regexp                                       1
3.485e-05     3.485e-05
org-point-at-end-of-empty-headline                  6
3.2403e-05    5.4005e-06
org-babel-header-arg-expand                         6
2.753...e-05  4.589...e-06
org-get-indentation                                 2
1.3004e-05    6.502e-06
org-load-modules-maybe                              6
1.2065e-05    2.010...e-06
org-src-native-tab-command-maybe                    6
1.1753e-05    1.958...e-06
org-try-cdlatex-tab                                 6
1.1116e-05    1.852...e-06
org-cycle-hide-inline-tasks                         6
6.695e-06     1.115...e-06
==========

Yeah... and of course when you try to measure something, the problem
goes away. There was no lag at all in that second experiment, and I'm
baffled. RAM is still at about the same useage (25%) as when I was
experiencing this before, as is CPU usage. All I've done since then:
- Copy ~4k lines of headlines from projects.org into other files
- Git pull to change from my reverted early May commit to the current
master branch
- make clean && make && make doc, which is my standard update process
- Copy the 4k lines of files back into the file

No clue.


John




On Wed, Aug 7, 2013 at 5:39 PM, Nick Dokos <ndokos@gmail.com> wrote:
> John Hendy <jw.hendy@gmail.com> writes:
>
>>> M-x elp-instrument-package org
>>> M-x elp-reset-all
>>> <run your workload>
>>> M-x elp-results
>>
>> Would it help to do this on a 6k file vs. a 10k file? Reducing my file
>> size made a huge difference, so if those results would be of
>> interest/help, I can definitely do that?
>>
>
> The more data the better, so yes, I think it's a useful exercise.
>
> --
> Nick
>
>

  reply	other threads:[~2013-08-07 23:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 20:25 Very slow performance in Org-mode on 10k line file? John Hendy
2013-08-07 21:39 ` Rainer Stengele
2013-08-07 21:47   ` John Hendy
2013-08-07 22:06     ` John Hendy
2013-08-07 22:12       ` Russell Adams
2013-08-07 22:17         ` John Hendy
2013-08-07 22:44           ` Russell Adams
2013-08-07 22:22 ` Nick Dokos
2013-08-07 22:24   ` John Hendy
2013-08-07 22:39     ` Nick Dokos
2013-08-07 23:02       ` John Hendy [this message]
2013-08-08  5:13         ` Achim Gratz
2013-08-12  3:43   ` faster agenda with properties support disabled (no org-refresh-properties) Daniel Clemente
2013-08-12  5:36     ` Carsten Dominik
2013-08-23  9:24       ` Daniel Clemente
2013-08-28  4:28         ` Samuel Wales
2013-08-28  8:28           ` Daniel Clemente
2013-08-31  5:58         ` Carsten Dominik
2013-08-31  6:22           ` Bastien
2013-09-02  5:09             ` Carsten Dominik
2013-09-02 10:54               ` Bastien
2013-09-03 12:02           ` Daniel Clemente
2013-09-03 13:21             ` Carsten Dominik

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='CA+M2ft96M6eUmMpWvppq2h3c-8VueSAKZRTt2Srt3=F+7qb45w@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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).