From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-shifmetadown/up are slow Date: Mon, 22 Jun 2009 07:41:00 +0200 Message-ID: References: <20524da70906212031y2b2521e7o7f465741c4e0da07@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIdS2-0006Rb-Mn for emacs-orgmode@gnu.org; Mon, 22 Jun 2009 02:56:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIdRy-0006RA-R5 for emacs-orgmode@gnu.org; Mon, 22 Jun 2009 02:56:22 -0400 Received: from [199.232.76.173] (port=57542 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIdRy-0006R7-M7 for emacs-orgmode@gnu.org; Mon, 22 Jun 2009 02:56:18 -0400 Received: from mx20.gnu.org ([199.232.41.8]:52247) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIdRx-0003k6-Nf for emacs-orgmode@gnu.org; Mon, 22 Jun 2009 02:56:18 -0400 Received: from mail-ew0-f220.google.com ([209.85.219.220]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MIdRw-0006Rl-F8 for emacs-orgmode@gnu.org; Mon, 22 Jun 2009 02:56:16 -0400 Received: by ewy20 with SMTP id 20so1175912ewy.42 for ; Sun, 21 Jun 2009 23:56:15 -0700 (PDT) In-Reply-To: <20524da70906212031y2b2521e7o7f465741c4e0da07@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org 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