emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: news1142@Karl-Voit.at
Cc: emacs-orgmode@gnu.org
Subject: Re: Performance issues after upgrading from Emacs 23.3 to 24.3
Date: Thu, 09 Jan 2014 22:10:37 +0100	[thread overview]
Message-ID: <87wqi897zm.fsf@gmail.com> (raw)
In-Reply-To: <2014-01-09T21-15-19@devnull.Karl-Voit.at> (Karl Voit's message of "Thu, 9 Jan 2014 21:24:33 +0100")

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

Karl Voit <devnull@Karl-Voit.at> writes:

> M-<up>/<down> of list item is fast again.
>
> Re-calculate table is fast again.
>
> Wohoo! :-) Thanks!

Applied. Thank you for the report.

> However, M-<up>/<down> of a big heading is still slow (see profile
> below). Probably, I am able to find other examples of slow behavior
> on the weekend, where I am using the Linux-machine that has the
> issue.

This operation is bound to be slow anyway. On top of it, you use
`org-indent-mode', which can be costly on large buffer changes.

Is it really worse than in 23.3?

Also, would you mind testing the following patch on top of master?
I don't expect much out of it since you're moving a behemoth, but it may
help.


Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Try-something-out.patch --]
[-- Type: text/x-diff, Size: 1211 bytes --]

From 6681efd30c34e86ede597b5b9ec219c9358fc7eb Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Thu, 9 Jan 2014 21:59:59 +0100
Subject: [PATCH] Try something out

---
 lisp/org-list.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index c0cf77e..f85c19b 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -134,6 +134,8 @@
 (declare-function org-export-string-as "ox"
 		  (string backend &optional body-only ext-plist))
 
+(declare-function org-element-type "org-element" (element))
+
 
 
 \f
@@ -489,10 +491,13 @@ group 4: description tag")
 	       (t (forward-line -1)))))))))))
 
 (defun org-at-item-p ()
-  "Is point in a line starting a hand-formatted item?"
+  "Non-nil when point is in a line starting a list item."
   (save-excursion
     (beginning-of-line)
-    (and (looking-at (org-item-re)) (org-list-in-valid-context-p))))
+    (and (looking-at (org-item-re))
+	 (or (not (derived-mode-p 'org-mode))
+	     (memq (org-element-type (save-match-data (org-element-at-point)))
+		   '(item plain-list))))))
 
 (defun org-at-item-bullet-p ()
   "Is point at the bullet of a plain list item?"
-- 
1.8.5.2


      reply	other threads:[~2014-01-09 21:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 16:54 Performance issues after upgrading from Emacs 23.3 to 24.3+prelude Karl Voit
2014-01-07  9:19 ` Bastien
2014-01-07 13:50   ` Karl Voit
2014-01-09 16:24     ` Eric S Fraga
2014-01-09 19:17   ` Karl Voit
2014-01-09 19:39     ` Nicolas Goaziou
2014-01-09 20:24       ` Performance issues after upgrading from Emacs 23.3 to 24.3 Karl Voit
2014-01-09 21:10         ` Nicolas Goaziou [this message]

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=87wqi897zm.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /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).