emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: treesitter local parser: huge slowdown and memory usage in a long fi


From: Dmitry Gutov
Subject: Re: treesitter local parser: huge slowdown and memory usage in a long file
Date: Fri, 7 Jun 2024 02:59:26 +0300
User-agent: Mozilla Thunderbird

On 04/06/2024 07:53, Yuan Fu wrote:
Yep, that sounds easier. And the performance should be about the same, even if 
it'd have a bit extra overhead in those theoretical complex cases.

Ok, I pushed a commit to master that does just that. I tried with C’s block 
comment, and php-ts-mode. Everything seems to work fine.

I also added treesit-primary-parser. This is supposed to be another 
configuration variable that a major mode should set. I’ve encountered various 
cases where knowing the primary parser (parser that parses the entire buffer 
rather than just a subset of it) would be very helpful. Treesit-primary-parser 
can be auto-guessed if major mode doesn’t set it, so it shouldn’t break 
anything. I’d love to know yours and Stefan’s thoughts on it.

Thanks Yuan, it's looking good.

The new variable probably deserves a mention in the manual, although if the guesser fallback is reliable enough (which it seems to be, given that we didn't hear seee reports about that specifically) maybe that's not urgent.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]