* org-shifmetadown/up are slow
@ 2009-06-22 3:31 Samuel Wales
2009-06-22 3:35 ` Samuel Wales
2009-06-22 5:41 ` Carsten Dominik
0 siblings, 2 replies; 6+ messages in thread
From: Samuel Wales @ 2009-06-22 3:31 UTC (permalink / raw
To: emacs-orgmode
I frequently rearrange headlines with org-shiftmetadown/up. It is
faster (in the human sense) than kill and yank or refile if the place
I want to put them is underneath a sibling.
However, it is sometimes slow, taking a second or two per command.
This occurs when there are large trees around.
Is this something that can be sped up, or is that impossible?
Here is a profile generated with mostly medium-sized trees (I will
have about thrice that size in some cases) in case it helps.
I did elp-insrument package org then a bunch of the relevant
operations then elp-results. Please tell me if there are better ways
to profile.
Thanks.
Function Name Call
Count Elapsed Time Average Time
============================================================
========== ============ ============
org-move-subtree-down 26
14.905667 0.5732948846
org-compact-display-after-subtree-move 26
13.594199000 0.5228538076
org-shiftmetaup 13
8.5230980000 0.6556229230
org-move-subtree-up 13
8.518649 0.6552806923
org-shiftmetadown 13
6.39124 0.4916338461
org-outline-level 215586
2.8513359999 1.322...e-05
org-cycle 2
1.3024040000 0.6512020000
org-cycle-internal-local 2
1.301338 0.650669
org-cycle-hide-drawers 54
1.2955700000 0.0239920370
org-shiftmetaright 2
0.694777 0.3473885
org-flag-drawer 4154
0.5626640000 0.0001354511
org-up-heading-safe 52
0.5439780000 0.0104611153
org-end-of-subtree 70
0.322521 0.0046074428
org-show-empty-lines-in-parent 26
0.2808310000 0.0108011923
org-map-tree 4
0.169852 0.042463
org-demote-subtree 2
0.086123 0.0430615
org-shiftmetaleft 2
0.08543 0.042715
org-promote-subtree 2
0.084803 0.0424015
org-set-tags 360
0.0846619999 0.0002351722
org-demote 180
0.0758529999 0.0004214055
org-promote 180
0.0739650000 0.0004109166
org-get-tags-string 360
0.0243989999 6.7775e-05
org-move-to-column 360
0.021485 5.968...e-05
org-optimize-window-after-visibility-change 2
0.017915 0.0089575
org-subtree-end-visible-p 1
0.017782 0.017782
org-cycle-hide-archived-subtrees 2
0.01267 0.006335
org-get-string-indentation 2187
0.0112600000 5.148...e-06
org-on-heading-p 390
0.0112379999 2.881...e-05
org-activate-tags 122
0.0107860000 8.840...e-05
org-back-to-heading 543
0.0093709999 1.725...e-05
org-cycle-show-empty-lines 54
0.0075979999 0.0001407037
org-back-over-empty-lines 91
0.007464 8.202...e-05
org-first-sibling-p 26
0.0072169999 0.0002775769
org-do-emphasis-faces 73
0.007172 9.824...e-05
org-activate-footnote-links 71
0.0054739999 7.709...e-05
org-at-table-p 32
0.005178 0.0001618125
org-activate-plain-links 113
0.0048619999 4.302...e-05
org-fontify-meta-lines-and-blocks 71
0.0041949999 5.908...e-05
org-show-entry 27
0.004002 0.0001482222
org-activate-dates 112
0.0035139999 3.1375e-05
org-font-lock-add-tag-faces 71
0.003265 4.598...e-05
org-save-markers-in-region 26
0.002781 0.0001069615
org-activate-bracket-links 83
0.0026320000 3.171...e-05
org-unfontify-region 71
0.0020489999 2.885...e-05
org-hide-archived-subtrees 1
0.001765 0.001765
org-remove-flyspell-overlays-in 161
0.0015259999 9.478...e-06
org-activate-angle-links 71
0.0014709999 2.071...e-05
org-font-lock-add-priority-faces 71
0.0014189999 1.998...e-05
org-clock-save-markers-for-cut-and-paste 26
0.001382 5.315...e-05
org-get-level-face 495
0.0012000000 2.424...e-06
org-before-change-function 504
0.0010000000 1.984...e-06
org-get-valid-level 360
0.0008940000 2.483...e-06
org-activate-code 71
0.000885 1.246...e-05
org-at-heading-p 28
0.000745 2.660...e-05
org-hide-wide-columns 71
0.000697 9.816...e-06
org-get-tag-face 53
0.0005709999 1.077...e-05
org-fix-position-after-promote 4
0.000531 0.00013275
org-hide-block-toggle-maybe 2
0.0005189999 0.0002594999
org-get-todo-face 31
0.0003670000 1.183...e-05
org-invisible-p 27
0.00026 9.629...e-06
org-check-and-save-marker 104
0.0002529999 2.432...e-06
org-font-lock-hook 71
0.0001789999 2.521...e-06
org-do-latex-and-special-faces 71
0.0001719999 2.422...e-06
org-skip-whitespace 26
0.0001680000 6.461...e-06
org-agenda-save-markers-for-cut-and-paste 26
0.0001629999 6.269...e-06
org-activate-target-links 71
0.0001359999 1.915...e-06
org-reinstall-markers-in-region 26
9.900...e-05 3.807...e-06
org-load-modules-maybe 2
9e-06 4.5e-06
--
Myalgic encephalomyelitis denialism is causing death and severe suffering,
worse than MS. Conflicts of interest are destroying research. /You/ can
get the disease at any time permanently. Do science and justice matter to
you? http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-shifmetadown/up are slow
2009-06-22 3:31 org-shifmetadown/up are slow Samuel Wales
@ 2009-06-22 3:35 ` Samuel Wales
2009-06-22 5:41 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2009-06-22 3:35 UTC (permalink / raw
To: emacs-orgmode
I should mention that I often autorepeat them. This also causes jumpy
behavior due to display algorithms.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-shifmetadown/up are slow
2009-06-22 3:31 org-shifmetadown/up are slow Samuel Wales
2009-06-22 3:35 ` Samuel Wales
@ 2009-06-22 5:41 ` Carsten Dominik
2009-06-22 18:43 ` Samuel Wales
1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2009-06-22 5:41 UTC (permalink / raw
To: Samuel Wales; +Cc: emacs-orgmode
On Jun 22, 2009, at 5:31 AM, Samuel Wales wrote:
> I frequently rearrange headlines with org-shiftmetadown/up. It is
> faster (in the human sense) than kill and yank or refile if the place
> I want to put them is underneath a sibling.
>
> However, it is sometimes slow, taking a second or two per command.
> This occurs when there are large trees around.
>
> Is this something that can be sped up, or is that impossible?
>
> Here is a profile generated with mostly medium-sized trees (I will
> have about thrice that size in some cases) in case it helps.
>
> I did elp-insrument package org then a bunch of the relevant
> operations then elp-results. Please tell me if there are better ways
> to profile.
Hi Sam,
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.
On Jun 22, 2009, at 5:35 AM, Samuel Wales wrote:
> I should mention that I often autorepeat them. This also causes jumpy
> behavior due to display algorithms.
What do you mean by "autorepeat" them?
- Carsten
>
> Thanks.
>
>
> Function Name Call
> Count Elapsed Time Average Time
> ============================================================
> ========== ============ ============
> org-move-subtree-down 26
> 14.905667 0.5732948846
> org-compact-display-after-subtree-move 26
> 13.594199000 0.5228538076
> org-shiftmetaup 13
> 8.5230980000 0.6556229230
> org-move-subtree-up 13
> 8.518649 0.6552806923
> org-shiftmetadown 13
> 6.39124 0.4916338461
> org-outline-level 215586
> 2.8513359999 1.322...e-05
> org-cycle 2
> 1.3024040000 0.6512020000
> org-cycle-internal-local 2
> 1.301338 0.650669
> org-cycle-hide-drawers 54
> 1.2955700000 0.0239920370
> org-shiftmetaright 2
> 0.694777 0.3473885
> org-flag-drawer 4154
> 0.5626640000 0.0001354511
> org-up-heading-safe 52
> 0.5439780000 0.0104611153
> org-end-of-subtree 70
> 0.322521 0.0046074428
> org-show-empty-lines-in-parent 26
> 0.2808310000 0.0108011923
> org-map-tree 4
> 0.169852 0.042463
> org-demote-subtree 2
> 0.086123 0.0430615
> org-shiftmetaleft 2
> 0.08543 0.042715
> org-promote-subtree 2
> 0.084803 0.0424015
> org-set-tags 360
> 0.0846619999 0.0002351722
> org-demote 180
> 0.0758529999 0.0004214055
> org-promote 180
> 0.0739650000 0.0004109166
> org-get-tags-string 360
> 0.0243989999 6.7775e-05
> org-move-to-column 360
> 0.021485 5.968...e-05
> org-optimize-window-after-visibility-change 2
> 0.017915 0.0089575
> org-subtree-end-visible-p 1
> 0.017782 0.017782
> org-cycle-hide-archived-subtrees 2
> 0.01267 0.006335
> org-get-string-indentation 2187
> 0.0112600000 5.148...e-06
> org-on-heading-p 390
> 0.0112379999 2.881...e-05
> org-activate-tags 122
> 0.0107860000 8.840...e-05
> org-back-to-heading 543
> 0.0093709999 1.725...e-05
> org-cycle-show-empty-lines 54
> 0.0075979999 0.0001407037
> org-back-over-empty-lines 91
> 0.007464 8.202...e-05
> org-first-sibling-p 26
> 0.0072169999 0.0002775769
> org-do-emphasis-faces 73
> 0.007172 9.824...e-05
> org-activate-footnote-links 71
> 0.0054739999 7.709...e-05
> org-at-table-p 32
> 0.005178 0.0001618125
> org-activate-plain-links 113
> 0.0048619999 4.302...e-05
> org-fontify-meta-lines-and-blocks 71
> 0.0041949999 5.908...e-05
> org-show-entry 27
> 0.004002 0.0001482222
> org-activate-dates 112
> 0.0035139999 3.1375e-05
> org-font-lock-add-tag-faces 71
> 0.003265 4.598...e-05
> org-save-markers-in-region 26
> 0.002781 0.0001069615
> org-activate-bracket-links 83
> 0.0026320000 3.171...e-05
> org-unfontify-region 71
> 0.0020489999 2.885...e-05
> org-hide-archived-subtrees 1
> 0.001765 0.001765
> org-remove-flyspell-overlays-in 161
> 0.0015259999 9.478...e-06
> org-activate-angle-links 71
> 0.0014709999 2.071...e-05
> org-font-lock-add-priority-faces 71
> 0.0014189999 1.998...e-05
> org-clock-save-markers-for-cut-and-paste 26
> 0.001382 5.315...e-05
> org-get-level-face 495
> 0.0012000000 2.424...e-06
> org-before-change-function 504
> 0.0010000000 1.984...e-06
> org-get-valid-level 360
> 0.0008940000 2.483...e-06
> org-activate-code 71
> 0.000885 1.246...e-05
> org-at-heading-p 28
> 0.000745 2.660...e-05
> org-hide-wide-columns 71
> 0.000697 9.816...e-06
> org-get-tag-face 53
> 0.0005709999 1.077...e-05
> org-fix-position-after-promote 4
> 0.000531 0.00013275
> org-hide-block-toggle-maybe 2
> 0.0005189999 0.0002594999
> org-get-todo-face 31
> 0.0003670000 1.183...e-05
> org-invisible-p 27
> 0.00026 9.629...e-06
> org-check-and-save-marker 104
> 0.0002529999 2.432...e-06
> org-font-lock-hook 71
> 0.0001789999 2.521...e-06
> org-do-latex-and-special-faces 71
> 0.0001719999 2.422...e-06
> org-skip-whitespace 26
> 0.0001680000 6.461...e-06
> org-agenda-save-markers-for-cut-and-paste 26
> 0.0001629999 6.269...e-06
> org-activate-target-links 71
> 0.0001359999 1.915...e-06
> org-reinstall-markers-in-region 26
> 9.900...e-05 3.807...e-06
> org-load-modules-maybe 2
> 9e-06 4.5e-06
>
> -- Myalgic encephalomyelitis denialism is causing death and severe
> suffering,
> worse than MS. Conflicts of interest are destroying research. /
> You/ can
> get the disease at any time permanently. 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-shifmetadown/up are slow
2009-06-22 5:41 ` Carsten Dominik
@ 2009-06-22 18:43 ` Samuel Wales
2009-07-08 5:07 ` Samuel Wales
0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2009-06-22 18:43 UTC (permalink / raw
To: Carsten Dominik; +Cc: emacs-orgmode
On Sun, Jun 21, 2009 at 22:41, Carsten Dominik<carsten.dominik@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-shifmetadown/up are slow
2009-06-22 18:43 ` Samuel Wales
@ 2009-07-08 5:07 ` Samuel Wales
2009-08-03 4:29 ` Carsten Dominik
0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2009-07-08 5:07 UTC (permalink / raw
To: Carsten Dominik; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 8750 bytes --]
I think that some of this is slow for inherent emacs reasons. Simply
doing down arrow can sometimes be slow. However, moving subtrees is
very slow. Dp you think it's mostly outline-mode? Is it possible to
defsubst after the fact?
Thanks.
On Mon, Jun 22, 2009 at 11:43, Samuel Wales<samologist@gmail.com> wrote:
> On Sun, Jun 21, 2009 at 22:41, Carsten Dominik<carsten.dominik@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
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: org-shifmetadown/up are slow
2009-07-08 5:07 ` Samuel Wales
@ 2009-08-03 4:29 ` Carsten Dominik
0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-08-03 4:29 UTC (permalink / raw
To: Samuel Wales; +Cc: emacs-orgmode
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<samologist@gmail.com>
> wrote:
>> On Sun, Jun 21, 2009 at 22:41, Carsten Dominik<carsten.dominik@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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-03 4:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22 3:31 org-shifmetadown/up are slow Samuel Wales
2009-06-22 3:35 ` Samuel Wales
2009-06-22 5:41 ` Carsten Dominik
2009-06-22 18:43 ` Samuel Wales
2009-07-08 5:07 ` Samuel Wales
2009-08-03 4:29 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.