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 16:51:08 +0300

> From: Ihor Radchenko <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 14 Apr 2023 12:52:32 +0000
> 
> Also, I am a bit confused about the purpose of
> 
>       /* Make sure the above arbitrary limit position is not in the
> 	 middle of composable text, so we don't break compositions by
> 	 submitting the composable text to the shaper in separate
> 	 chunks.  We play safe here by assuming that only SPC, TAB,
> 	 FF, and NL cannot be in some composition; in particular, most
> 	 ASCII punctuation characters could be composed into ligatures.  */
> 
> in compute_stop_pos
> 
> AFAIU, it tries hard to not stop in the middle of composed region. 

That one is mainly about automatic compositions, not static
compositions.

> Then, why need to fall back to 500 in the
> composition_compute_stop_pos call?

Because composition_compute_stop_pos is called from many other places,
for other reasons.