[Top][All Lists]

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

Re: How to add pseudo vector types

From: Stefan Monnier
Subject: Re: How to add pseudo vector types
Date: Sat, 24 Jul 2021 11:10:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> I see absolutely no problem with scaling in making a copy: the extra
>> memory and CPU time taken by the copy will be a constant factor which
>> I don't expect to go much beyond 10%
> 10% of what?  It will be 100% of all the buffers that need parsing.

10% of the memory used by that buffer, since TS's data structure eats up
about 10x the size of the buffer's text.

Given the memory needs of TS we may decide to have
a `tree-sitter-maximum-size` config to disable TS on overly large
buffers (just like font-lock has such a setting, since when used
without jit-lock, font-lock also can easily end up using more memory
than the buffer's text).


reply via email to

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