[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to add pseudo vector types
From: |
Clément Pit-Claudel |
Subject: |
Re: How to add pseudo vector types |
Date: |
Tue, 20 Jul 2021 14:05:36 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/20/21 1:36 PM, Stefan Monnier wrote:
>>> 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.
Ah, sorry, I didn't see your message, so I sent an answer that's approximately
equivalent.
But note that I'm not even sure we need to copy the buffer. Of course, I agree
that it makes a lot of things a lot simpler.
- Re: How to add pseudo vector types, (continued)
- Re: How to add pseudo vector types, Stephen Leake, 2021/07/24
- Re: How to add pseudo vector types, Dmitry Gutov, 2021/07/24
- Re: How to add pseudo vector types, Stephen Leake, 2021/07/20
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/20
- Re: How to add pseudo vector types, Stefan Monnier, 2021/07/20
- Re: How to add pseudo vector types, Stefan Monnier, 2021/07/20
- Re: How to add pseudo vector types,
Clément Pit-Claudel <=
- Re: How to add pseudo vector types, Stephen Leake, 2021/07/21
- Re: How to add pseudo vector types, Stefan Monnier, 2021/07/21
- Re: How to add pseudo vector types, Clément Pit-Claudel, 2021/07/20
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/20
- Re: [SPAM UNSURE] Re: How to add pseudo vector types, Stephen Leake, 2021/07/21
- Re: [SPAM UNSURE] Re: How to add pseudo vector types, Clément Pit-Claudel, 2021/07/21
- Re: [SPAM UNSURE] Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/21
- Re: [SPAM UNSURE] Re: How to add pseudo vector types, Clément Pit-Claudel, 2021/07/22
- Re: [SPAM UNSURE] Re: How to add pseudo vector types, Eli Zaretskii, 2021/07/22
- Re: [SPAM UNSURE] Re: How to add pseudo vector types, Clément Pit-Claudel, 2021/07/22