emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter navigation time grows as sqrt(line-number)


From: Dmitry Gutov
Subject: Re: Tree-sitter navigation time grows as sqrt(line-number)
Date: Fri, 18 Aug 2023 16:29:21 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 18/08/2023 05:49, Yuan Fu wrote:

So I guess the cursor stuff caused the crash.

Not at all, the crash was entirely the fault of v1 of my patch (where I didn't check whether the returned node is_null.

> But we shouldn’t fix it by using tree_sitter_node_parent, we purposefully replaced it using the cursor API, see bug#60054.

Yeah, I've found this thread a little after posting the v2 patch.

Even so, trying it out might be useful to see whether the built-in ts_node_parent is faster in some specific usage scenarios than what we currently have to use. If that is found to be the case, we'll know the potential direction for improvement, at least.



reply via email to

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