Subject: Re: bug#78402: treesit after-change-functions

From: Juri Linkov <[email-masked]>
Date: Wed, 21 May 2025 09:35:18 +0300

>>> Btw, what’s the issue we’re trying to fix here? If some lisp want to have
>>> up-to-date ranges, it can just call treesit--pre-redisplay or
>>> treesit-update-ranges. Why do we get the node-outdated error?
>>
>> Hmm... so what you're saying is that we should do something like the
>> patch below?
>
> Maybe Yuan could confirm if `treesit-update-ranges`
> is already optimized for frequent calls on overlapping ranges
> that don't need updating and where 'beg' and 'end' fall back
> to (point-min) and (point-max).

It seems not optimized since in my tests outline-minor-mode
is much slower with this change.