On 10/09/2013 08:59 PM, Eli Zaretskii wrote: > IOW, this is bug #13675, which has nothing to do with bidi. As long > as the basic display algorithms are not changed to fix that bug, I'm > going to claim that bidi is not the issue here. Hm... I have two files, with 2000 and 4000 first chars extracted from the beginning of the monster string from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15555#5. The following function: (defun bug15555 () (interactive) (while (not (eobp)) (right-char 1) (redisplay) (sleep-for 0.01))) runs smoothly over 2000.txt, but painfully slow over 4000.txt. The latter case also shows the very pathological profile with ~25% CPU spent in memcpy. Are you sure that bidi_copy_it doesn't add one more bottleneck to the whole stuff? Dmitry