bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9218: 24.0.50; bidi-display-reordering slowdown


From: Eli Zaretskii
Subject: bug#9218: 24.0.50; bidi-display-reordering slowdown
Date: Tue, 02 Aug 2011 22:25:24 +0300

> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]