[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: Tue, 20 Jul 2021 13:36:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> If we copy the buffer's content to a freshly malloc area before passing
>> that to TS, then there should be no problem running TS in a separate
>> concurrent thread, indeed.
> Except that the results will not be useful, since they won't apply to
> the original buffer if it is changed.

Not true: we just have to keep track of the list of changes (as Yuan's
patch does), then pass it to tree-sitter to get a tree up-to-date w.r.t
the current content of the buffer.

> And if the original buffer is not changed, then we do not need to run
> the parser asynchronously.

We do:
- because we want to do other things in the mean time
- because we want to take advantage of the many CPU cores sitting idle.


reply via email to

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