Subject: Re: bug#62780: 30.0.50; Redisplay gets slow when using Org tables + show-trailing-whitespace

From: Eli Zaretskii <[email-masked]>
Date: Fri, 14 Apr 2023 18:06:29 +0300

> From: Ihor Radchenko <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 14 Apr 2023 14:56:13 +0000
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> I see. But can the same limit be re-used for static compositions?
> >
> > Which limit is that?
> 
> I am referring to limit in compute_stop_pos. It is unused
> when calling composition_compute_stop_pos.

You want to reduce the limit inside composition_compute_stop_pos from
500 to 100?  If you try that, does it speed up this scenario enough to
consider such a change?

> Of course, if your idea with completely bypassing
> composition_compute_stop_pos call works, it will be even better.

We cannot bypass composition_compute_stop_pos in compute_stop_pos,
because it also looks for auto-composable characters, those controlled
by composition-function-table.  But I think we _can_ avoid calling
find_composition from composition_compute_stop_pos in this particular
case.