all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 62780@debbugs.gnu.org
Subject: bug#62780: 30.0.50; Redisplay gets slow when using Org tables + show-trailing-whitespace
Date: Tue, 11 Apr 2023 19:41:01 +0000	[thread overview]
Message-ID: <87h6tm8awi.fsf@localhost> (raw)
In-Reply-To: <83y1my8bmi.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

> show-trailing-whitespace disables quite a few redisplay optimizations,
> including even the cursor-motion optimization (when nothing has
> changed on display except the position of point).  And full thorough
> redisplay becomes slow when you have relatively long lines, because
> Emacs is forced to consider all of them.

Well. But it is not even that big of a file. And the lines are shorter
than window width.

I could understand Emacs lagging on some really large file or long
lines, but this does not look large at all!

> In addition, org-table seems to put a large number of 'display'
> properties (like, 2 per cell?), which also slows down redisplay.

These properties are for the purpose of bidirectional ordering:

(defconst org-table--separator-space-pre
  (propertize " " 'display '(space :relative-width 1))
  "Space used in front of fields when aligning the table.
This space serves as a segment separator for the purposes of the
bidirectional reordering.
Note that `org-table--separator-space-pre' is not `eq' to
`org-table--separator-space-post'.  This is done to prevent Emacs from
visually merging spaces in an empty table cell.  See bug#45915.")

Maybe there is a better way?

> Are you saying there's been a regression in Emacs 30 in this situation
> wrt Emacs 29 and Emacs 28?  I don't think I see a regression in my
> testing here.

No, I do not mean a regression. But the slowdown appears to be
unreasonable for such a small test case. What is the point having
`show-trailing-whitespace' if it is this much inefficient? Maybe a
simple font-lock rule can be better?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





  reply	other threads:[~2023-04-11 19:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 18:52 bug#62780: 30.0.50; Redisplay gets slow when using Org tables + show-trailing-whitespace Ihor Radchenko
2023-04-11 19:25 ` Eli Zaretskii
2023-04-11 19:41   ` Ihor Radchenko [this message]
2023-04-12  7:19     ` Eli Zaretskii
2023-04-12  7:39       ` Ihor Radchenko
2023-04-12  7:58         ` Eli Zaretskii
2023-04-13  9:46       ` Ihor Radchenko
2023-04-13 10:45         ` Eli Zaretskii
2023-04-13 11:15           ` Ihor Radchenko
2023-04-13 14:33             ` Eli Zaretskii
2023-04-14  9:20               ` Ihor Radchenko
2023-04-14 10:37                 ` Eli Zaretskii
2023-04-14 11:36                   ` Ihor Radchenko
2023-04-14 12:06                     ` Eli Zaretskii
2023-04-14 12:23                       ` Eli Zaretskii
2023-04-14 12:52                         ` Ihor Radchenko
2023-04-14 13:51                           ` Eli Zaretskii
2023-04-14 13:56                             ` Ihor Radchenko
2023-04-14 14:47                               ` Eli Zaretskii
2023-04-14 14:56                                 ` Ihor Radchenko
2023-04-14 15:06                                   ` Eli Zaretskii
2023-04-14 15:23                                     ` Ihor Radchenko
2023-04-14 12:28                       ` Ihor Radchenko
2023-04-29  8:57                         ` Eli Zaretskii
2023-04-29 18:03                           ` Ihor Radchenko

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=87h6tm8awi.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=62780@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.