Subject: Re: bug#60223: 29.0.60; Improve how tree-sitter changes to treesit--font-lock-fast-mode

From: ronisbr <[email-masked]>
Date: Wed, 21 Dec 2022 12:59:27 -0300

Hi Yuan!

Em 2022-12-21 01:17, Yuan Fu escreveu:
> Thanks for the report!
> 
> The "fast mode" should be buffer-local, so that particular file
> shouldn’t affect other buffers. Just to make sure, you said that if you
> open print.jl first, all other files are affected?

Sorry for the misunderstanding. Indeed, only print.jl is affected.

The behavior is:

     1. If I open `print.jl` as the first file, the fast mode is 
activated,
        and the buffer shows a very strange font lock. All other buffers
        (including Julia files) work as expected.
     2. If I open any other Julia file and then I open `print.jl`, the 
fast
        mode is not activated, and everything works as expected.

> And I agree that the 0.01 second criterion is a crude one, but a long
> string shouldn’t affect the _query_ time, and that string is not long 
> at
> all, far from enough to make tree-sitter query to slow down. Let me
> investigate and see what’s the real cause, and if this can be solved by
> better solutions than making the threshold customizable. We can’t 
> expect
> everyone to be able to pinpoint the culprit like you did :-)
> 
> Yuan

Thanks! Let me know if I can help debugging :)

Best regards,
Ronan Arraes