Hi Samuel,
On Jul 8, 2009, at 7:07 AM, Samuel Wales wrote:
I think that some of this is slow for inherent emacs reasons. Simply
doing down arrow can sometimes be slow.
Yes, if there is *lots* of hidden text the cursor has to jump over.
However, moving subtrees is
very slow. Dp you think it's mostly outline-mode? Is it possible to
defsubst after the fact?
Please pull from git, this problem should have disappeared,
I simplified the cleanup of the display after moving a subtree
which became *very* expensive for entries with very many siblings.
So the reason was Org in a way, but the reason why this operation
was slow is because outline functions used are slow.
What I have done now as well is advising outline-end-of-subtree
to use my own version when in Org-mode, so that any outline commands
using it will now be much faster.
The reason why outline functions are so extremely slow for some
operations are:
- they have been written in full generality, with possibly weird
strings as outline headings, so they need to find each and every
heading and compute the outline level. Org, on the other hand,
knows that the headline level is directly given by the number
of stars and can directly search for the right kind of heading
that will terminate the subtree.
- Outline functions have been written with book-like structure
in mind, i.e. with a limited number of nodes. Large and deep
lists as we have them will cause this code to perform badly.
HTH
- Carsten
Thanks.
On Mon, Jun 22, 2009 at 11:43, Samuel Wales<samolog...@gmail.com>
wrote:
On Sun, Jun 21, 2009 at 22:41, Carsten Dominik<carsten.domi...@gmail.com
> wrote:
could you please re-run these tests, and instrument for elp not
only org, but also the entire outline package? Seems to me that
much of this time is spent in a non-org function.
Function Name Call
Count Elapsed Time Average Time
============================================================
========== ============ ============
org-move-subtree-down 97
213.619874 2.2022667422
org-compact-display-after-subtree-move 96
203.12814400 2.1159181666
outline-end-of-subtree 392
156.43101299 0.3990587066
outline-next-heading 1925977
139.79470300 7.258...e-05
outline-flag-subtree 104
114.38383400 1.0998445576
org-shiftmetadown 51
109.818661 2.1533070784
org-shiftmetaup 46
103.837425 2.2573353260
org-move-subtree-up 46
103.821831 2.2569963260
outline-map-region 191
40.191857999 0.2104285759
org-outline-level 1905188
25.819659000 1.355...e-05
org-cycle-hide-drawers 183
11.270871000 0.0615894590
org-flag-drawer 29066
5.4703569999 0.0001882046
outline-next-visible-heading 386
4.2212859999 0.0109359740
outline-get-last-sibling 46
2.634253 0.0572663695
outline-previous-visible-heading 335
2.6118669999 0.0077966179
org-shiftmetaright 8
2.3084010000 0.2885501250
org-up-heading-safe 192
2.1500000000 0.0111979166
org-end-of-subtree 234
1.9466359999 0.0083189572
outline-get-next-sibling 51
1.6207019999 0.0317784705
outline-flag-region 30978
1.4932559999 4.820...e-05
org-show-empty-lines-in-parent 96
1.132384 0.0117956666
outline-up-heading 8
0.335284 0.0419105
outline-previous-heading 6570
0.2229150000 3.392...e-05
outline-show-heading 1241
0.0924400000 7.448...e-05
outline-back-to-heading 1624
0.0664180000 4.089...e-05
org-mouse-down-mouse 1
0.063905 0.063905
outline-end-of-heading 1634
0.0632650000 3.871...e-05
outline-on-heading-p 1903
0.0591330000 3.107...e-05
org-back-over-empty-lines 341
0.0572220000 0.0001678064
org-save-markers-in-region 96
0.0429849999 0.0004477604
org-cycle-show-empty-lines 192
0.0419749999 0.0002186197
org-back-to-heading 642
0.0355740000 5.541...e-05
org-agenda-save-markers-for-cut-and-paste 96
0.035326 0.0003679791
org-do-emphasis-faces 197
0.0349929999 0.0001776294
org-first-sibling-p 96
0.034133 0.0003555520
org-map-tree 16
0.0297049999 0.0018565624
org-show-entry 87
0.0282949999 0.0003252298
org-at-table-p 113
0.0230579999 0.0002040530
org-activate-tags 310
0.0217709999 7.022...e-05
org-shiftmetaleft 8
0.0200029999 0.0025003749
org-activate-footnote-links 196
0.0184260000 9.401...e-05
org-set-tags 16
0.0175759999 0.0010984999
org-demote-subtree 8
0.017286 0.00216075
org-promote-subtree 8
0.015923 0.001990375
org-on-heading-p 129
0.0156239999 0.0001211162
org-activate-plain-links 311
0.0152919999 4.917...e-05
org-demote 8
0.0135389999 0.0016923749
org-promote 8
0.01195 0.00149375
org-font-lock-add-tag-faces 196
0.0114169999 5.824...e-05
org-activate-dates 275
0.0104949999 3.816...e-05
org-activate-bracket-links 221
0.007836 3.545...e-05
org-unfontify-region 196
0.0074030000 3.777...e-05
org-check-and-save-marker 3840
0.0069260000 1.803...e-06
org-get-tags-string 16
0.0066159999 0.0004134999
org-at-heading-p 104
0.0065090000 6.258...e-05
org-fontify-meta-lines-and-blocks 196
0.0056479999 2.881...e-05
org-activate-angle-links 196
0.0051379999 2.621...e-05
outline-next-preface 96
0.005108 5.320...e-05
org-font-lock-add-priority-faces 196
0.004841 2.469...e-05
org-activate-code 196
0.003812 1.944...e-05
org-get-level-face 1302
0.0037469999 2.877...e-06
org-remove-flyspell-overlays-in 366
0.0031399999 8.579...e-06
org-fix-position-after-promote 16
0.002157 0.0001348125
org-invisible-p 97
0.0021190000 2.184...e-05
org-get-tag-face 126
0.0020839999 1.653...e-05
org-move-to-column 16
0.0018859999 0.0001178749
org-hide-wide-columns 196
0.0016239999 8.285...e-06
org-get-todo-face 60
0.0011369999 1.894...e-05
org-before-change-function 224
0.0007810000 3.486...e-06
org-skip-whitespace 96
0.000674 7.020...e-06
org-activate-target-links 196
0.0006510000 3.321...e-06
org-font-lock-hook 196
0.0005240000 2.673...e-06
org-do-latex-and-special-faces 196
0.000437 2.229...e-06
org-reinstall-markers-in-region 96
0.0003680000 3.833...e-06
org-get-valid-level 16
0.0001910000 1.193...e-05
org-get-string-indentation 4
0.000169 4.225e-05
org-mouse-in-region-p 1
1.7e-05 1.7e-05
org-mouse-mark-active 1
3e-06 3e-06
Thanks.
Samuel
--
Myalgic encephalomyelitis causes death and severe suffering.
You can get it any time and never recover. Conflicts of
interest are destroying research. Do science and justice
matter to you? http://www.meactionuk.org.uk/
What_Is_ME_What_Is_CFS.htm
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode