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: Stefan Monnier
Subject: Re: treesitter local parser: huge slowdown and memory usage in a long file
Date: Sun, 26 May 2024 00:23:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> The only problem is to decide how long a history of updated ranges do we
> keep for each parser. The 100% correct approach is to maintain a separate
> history for each consumer, and never throw away old ranges until the
> consumer consumes them. But then you risk wasting memory if some consumer
> never consumes the ranges. To handle that we can add a hard limit. But then
> this hard limit might be too low for some edge case… We can make this hard
> limit configurable, and if we ever encountered a case where this hard limit
> is not enough and there’s no way around it (unlikely), we can instruct users
> or lisp program to increase it.

Side note: the above is fairly close to describing `track-changes.el`.
[ where I don't have any hard limit, currently.  ]


        Stefan




reply via email to

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