Subject: bug#69385: 30.0.50; Long lines with bidi text slow down Emacs

From: Stephen Berman <[email-masked]>
Date: Mon, 26 Feb 2024 18:12:04 +0100

On Mon, 26 Feb 2024 18:36:42 +0200 Eli Zaretskii <[email-masked]> wrote:

[...]
> Can you measure the time it takes to redraw the window after M->, with
> and without bidi-display-reordering?  I'd like to have numbers here,
> not just impressions.  For example, measure it with benchmark-run or
> something similar.

On master started with -Q in a buffer containing a single line
consisting of 800 repetitions of "السّلام عليكم Hello " (in the buffer
the string " Hello " was to the left of the Arabic string because I
yanked the latter first), with bidi-display-reordering at its default
value t and with point at point-min, running (benchmark-run nil
(end-of-buffer)) returned:

(5.249231941 1 0.014300497000000023)

After moving point back to point-min and setting bidi-display-reordering
to nil, running (benchmark-run nil (end-of-buffer)) again now returned:

(0.034058467 0 0.0)

Steve Berman