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: Fri, 14 Apr 2023 11:36:09 +0000 [thread overview]
Message-ID: <87pm86n1au.fsf@localhost> (raw)
In-Reply-To: <83ttxig375.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> writes:
>> I cannot reproduce.
>> The typing has no noticeable delays.
>
> Your build is optimized, yes? Try building without optimizations, you
> will see quite significant delays just by creating the table.
Sure, but there is no obvious culprit then:
4.01% emacs emacs [.] lookup_char_property
3.04% emacs emacs [.] make_lisp_symbol
3.01% emacs emacs [.] find_interval
2.85% emacs emacs [.] next_interval
2.37% emacs emacs [.] XSYMBOL
2.27% emacs emacs [.] SYMBOLP
2.16% emacs emacs [.] make_lisp_symbol
2.06% emacs emacs [.] make_lisp_symbol
Various functions contribute almost equally with relatively larger (yet,
just 4%) contribution from lookup_char_property called from face_at_pos
(according to the call graph).
I looked into the number of calls to face_at_pos, find_composition, and
handle_display_prop. The number of calls is almost the same. Thus, my
guess is that find_composition is somehow slower than the other two
functions.
Looking int the code, I can see that handle_display_prop does not call
Fnext_single_property_change at all and face_at_pos limits the forward
lookup by TEXT_PROP_DISTANCE_LIMIT. In contrast, compute_stop_pos calls
composition_compute_stop_pos without making use of
TEXT_PROP_DISTANCE_LIMIT (AFAIU) and looks all the way to point-max. (Do
I understand correctly that it implies O(N_intervals^2)??)
> In any case, if you think disabling static composition can be a
> reasonable option for Org Table users (do they use
> prettify-symbols-mode, for example, in the same buffer where they have
> Org tables?), that should be easy.
I'd still prefer to find a better way and leave this workaround as the
last resort.
--
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>
next prev parent reply other threads:[~2023-04-14 11:36 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pm86n1au.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).