all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: emacs-devel@gnu.org
Subject: Re: Performance under bidi-paragraph-direction 'left-to-right vs bidi-display-reordering nil
Date: Sun, 24 Nov 2019 18:00:14 +0200	[thread overview]
Message-ID: <831rtxtgc1.fsf@gnu.org> (raw)
In-Reply-To: <06329813-a32a-2eb8-61b9-337b67d84a4c@orcon.net.nz> (message from Phil Sainty on Sun, 24 Nov 2019 23:41:56 +1300)

> From: Phil Sainty <psainty@orcon.net.nz>
> Date: Sun, 24 Nov 2019 23:41:56 +1300
> 
> As discussed in
> https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00294.html
> setting bidi-display-reordering nil isn't a supported/tested scenario,
> and in so-long.el we changed that to set bidi-paragraph-direction to
> 'left-to-right instead.
> 
> I've just traced what seemed like a performance regression to this
> change -- it's now apparent to me that there's a noticeable effect on
> the redisplay performance having bidi-display-reordering enabled and
> bidi-paragraph-direction set (at least under long-line situations)
> which isn't experienced when bidi-display-reordering is disabled.

I never said that setting bidi-paragraph-direction will provide the
same CPU savings as bidi-display-reordering.  If something I said
could have been interpreted that way, I apologize.  The latter
disables the bidi reordering engine; the former does not, it just
makes its job a little easier.

> I do imagine that the code already tries hard to be efficient, but if
> there's any chance that with only bidi-paragraph-direction set we can
> achieve performance nearer to that with bidi-display-reordering
> disabled, that would seemingly be beneficial for files with extremely
> long lines.

Maybe there's a chance, but I don't know how to optimize the code more
than it already is.  Ideas and patches are more than welcome in that
area.

> Failing that, it makes me wonder whether a nil bidi-display-reordering
> should be under consideration as a supported state for end users, for
> the performance benefits.

Sorry, no.  I will object to any core package setting
bidi-display-reordering to a nil value, as that causes the display
code to work in conditions it isn't supposed to, isn't being tested
in, and execute branches of code that aren't being actively developed.
Moreover, some parts of the display engine were written under the
basic assumption that this variable is never nil.  Setting that
variable to nil thus gives you an Emacs that cannot be trusted to
produce reliable results on display, so its only valid use is for
special tests and debugging.



  reply	other threads:[~2019-11-24 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-24 10:41 Performance under bidi-paragraph-direction 'left-to-right vs bidi-display-reordering nil Phil Sainty
2019-11-24 16:00 ` Eli Zaretskii [this message]
2019-11-30  8:42   ` Phil Sainty

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=831rtxtgc1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=psainty@orcon.net.nz \
    /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.