From: Eli Zaretskii <eliz@gnu.org>
To: yantar92@posteo.net
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 15:23:55 +0300 [thread overview]
Message-ID: <83mt3afy90.fsf@gnu.org> (raw)
In-Reply-To: <83pm86fz2e.fsf@gnu.org> (message from Eli Zaretskii on Fri, 14 Apr 2023 15:06:17 +0300)
> Cc: 62780@debbugs.gnu.org
> Date: Fri, 14 Apr 2023 15:06:17 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > From: Ihor Radchenko <yantar92@posteo.net>
> > Cc: 62780@debbugs.gnu.org
> > Date: Fri, 14 Apr 2023 11:36:09 +0000
> >
> > 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)??)
Btw, it is not true that we are looking all the way to point-max in
this case: you will see in composition_compute_stop_pos that it limits
the search to the next 500 buffer positions:
void
composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
ptrdiff_t bytepos, ptrdiff_t endpos,
Lisp_Object string)
{
ptrdiff_t start, end;
int c;
Lisp_Object prop, val;
/* This is from forward_to_next_line_start in xdisp.c. */
const int MAX_NEWLINE_DISTANCE = 500;
if (charpos < endpos)
{
if (endpos > charpos + MAX_NEWLINE_DISTANCE)
endpos = charpos + MAX_NEWLINE_DISTANCE;
}
[...]
if (charpos < endpos
&& find_composition (charpos, endpos, &start, &end, &prop, string)
&& start >= charpos
&& composition_valid_p (start, end, prop))
next prev parent reply other threads:[~2023-04-14 12:23 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
2023-04-14 12:06 ` Eli Zaretskii
2023-04-14 12:23 ` Eli Zaretskii [this message]
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=83mt3afy90.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=62780@debbugs.gnu.org \
--cc=yantar92@posteo.net \
/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).