all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Florian Beck <abstraktion@t-online.de>
Cc: 9218@debbugs.gnu.org
Subject: bug#9218: 24.0.50; bidi-display-reordering slowdown
Date: Tue, 02 Aug 2011 22:25:24 +0300	[thread overview]
Message-ID: <83sjpjaa57.fsf@gnu.org> (raw)
In-Reply-To: <87aabsuash.fsf@sophokles.streitblatt.de>

> From: Florian Beck <abstraktion@t-online.de>
> Cc: Florian Beck <abstraktion@t-online.de>,  9218@debbugs.gnu.org
> Date: Mon, 01 Aug 2011 22:38:54 +0200
> 
> I just don't understand why it has to be that slow. I have paragraphs of
> reasonable length.

It turns out the problem was with looking for possible display
properties and strings (text covered by them is reordered as a single
entity).  This searched to the end of the humongous buffer every time
Emacs needed to determine paragraph direction.  There was a cache that
should have prevented all such searches but the first one, but Org
mode caused that cache to be invalidated due to its display tricks.
Plus, since the display is folded, what shows on the screen as 50
innocent lines actually hides 50 paragraphs, which means Emacs did
that long search 50 times...

To fix this, I dropped the simplistic cache, and instead introduced
machinery that searches at most 5K characters forward.





      parent reply	other threads:[~2011-08-02 19:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 18:45 bug#9218: 24.0.50; bidi-display-reordering slowdown Florian Beck
2011-08-01 18:51 ` Eli Zaretskii
2011-08-01 19:00   ` Eli Zaretskii
2011-08-01 19:34     ` Florian Beck
2011-08-01 19:38       ` Eli Zaretskii
2011-08-01 20:38         ` Florian Beck
2011-08-02  5:40           ` Eli Zaretskii
2011-08-02  9:01             ` Eli Zaretskii
2011-08-02 19:20               ` Eli Zaretskii
2011-08-02 19:25           ` Eli Zaretskii [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sjpjaa57.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=9218@debbugs.gnu.org \
    --cc=abstraktion@t-online.de \
    /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 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.