|
From: | Dmitry Gutov |
Subject: | Re: Using incremental parsing in Emacs |
Date: | Mon, 6 Jan 2020 01:44:20 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 03.01.2020 22:05, Eli Zaretskii wrote:
But that's just MO; I started this thread to maybe inspire someone to have a second look on the related features and propose ways of improving what we do today, both feature-wise and speed-wise, as I see quite a few complaints about lack of features and slowness in stuff like font-lock.
IME font-lock is slow:- On long lines (which is hard to improve by simply implementing something in C),
- In certain major modes, on particular ones in CC Mode collection.I imagine the latter is also caused by a relative complexity of the syntax in C++ and related languages, but also because, IIUC, CC Mode doesn't really do incremental parsing.
syntax-propertize-function, which is used by many other modes, kind of uses that paradigm, with a certain amount of success.
So the main thing I'd really expect from the new approach is "new features", i.e. ways to easier and more clearly express language syntax. Which, in turn, could entice our CC Mode developer to use it, with corresponding improvement in perceived performance. And, really, if TreeSitter's algorithmic complexity is good enough for us, it can probably be implemented in Lisp. With some critical section or two in C, maybe.
[Prev in Thread] | Current Thread | [Next in Thread] |