A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01491.html below:

Re: master c69858b3f0: ; * lisp/treesit.el (treesit-ready-p): Guard agai

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Stefan Monnier Subject: Re: master c69858b3f0: ; * lisp/treesit.el (treesit-ready-p): Guard against empty buffers. Date: Wed, 23 Nov 2022 09:57:38 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
>> But my question was not so much pointing out a problem but trying to
>> understand why we chose the more complex code.
> Because we need to compare with byte positions,

Ah, because we wrote "(in bytes)" in the docstring of
`treesit-max-buffer-size`.  That's a rather unusual choice.  All other
places were we use(d) a limit on the buffer size it's always been based
on the number of chars.

I doubt it would make a significant difference here either (e.g. not
only the "10 times" memory use of the tree-sitter tree is obviously
a rough approximation, but I doubt it's related to the number of bytes
more than to the number of chars or even the number of lexemes).


        Stefan




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4