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: JD Smith
Subject: Re: Tree-sitter navigation time grows as sqrt(line-number)
Date: Thu, 17 Aug 2023 08:21:33 -0400

Thanks for that, but I’m afraid I haven’t yet had time.  I provided the test 
code and target file in the hopes that others could confirm the scaling 
behavior and then experiment with algorithm tweaks, if anything obvious 
presented itself.

> On Aug 17, 2023, at 6:56 AM, Dmitry Gutov <dmitry@gutov.dev> wrote:
> 
> On 17/08/2023 07:01, JD Smith wrote:
>> I’m unclear whether this is fundamental to the tree-sitter parse/tree 
>> algorithm, or if the scaling comes from Emacs’ TS implementation.  It does 
>> vaguely remind me of similar scaling with an old line-numbering algorithm, 
>> where lines were always being counted from the beginning of the buffer, so 
>> very fast at the front, and very slow near the end.
> 
> Have you tried my patch yet?




reply via email to

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