emacs-devel
[Top][All Lists]
Advanced

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

Re: Reliable after-change-functions (via: Using incremental parsing in E


From: Dmitry Gutov
Subject: Re: Reliable after-change-functions (via: Using incremental parsing in Emacs)
Date: Tue, 31 Mar 2020 17:31:43 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 31.03.2020 16:14, Eli Zaretskii wrote:
Why does it need the entire buffer up front? that sounds like a
potential performance killer.  Fontifying a small part of a buffer
doesn't need its entire text.

Because the end product of parsing the buffer is an AST, and the author decided to minimize the odds of problems that come with incomplete/broken ASTs.

The previous (first) discussion of TreeSitter has an URL to a presentation video. You can give it a watch.

Regarding performance, their solution is to make first parsing as fast as possible, and updates to an existing AST faster still.

As for the difficulty of sending the whole buffer contents... maybe VS Code and Atom somehow make it easier? If so, someone should investigate why it has to be slower in Emacs.



reply via email to

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