Subject: Re: bug#59738: c-ts-mode is slow with large buffers.

From: Eli Zaretskii <[email-masked]>
Date: Sun, 11 Dec 2022 09:25:04 +0200

> From: Yuan Fu <[email-masked]>
> Date: Sat, 10 Dec 2022 15:14:27 -0800
> Cc: Eli Zaretskii <[email-masked]>,
>  [email-masked]
> 
> Querying time (thus fontification time) increases as the buffer size increases, even if we limit the range of the query to a fixed region (which is what we do in tree-sitter font-lock). This is unlike c-mode, where fontifying a region takes the same amount of time regardless of the buffer size.

The last sentence is inaccurate: sometimes CC Mode must look far
beyond the fixed region which jit-lock.el asks it to fontify.  AFAIR,
that is mainly to figure out the syntactical context of the portion of
the buffer that needs to be fontified.