emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 22 Jul 2021 00:59:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/21/21 9:51 AM, Eli Zaretskii wrote:
>> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
>> Date: Wed, 21 Jul 2021 09:38:31 -0400
>> Cc: emacs-devel@gnu.org
>>
>>    <valuable text><small bit of the gap because the gap moved while TS was 
>> scanning><more valuable data>
>>
>> and then, knowing that the gap had moved, re-feeding it just the area that 
>> corresponds to the places around the boundaries of the gap might yield a 
>> speedup.
> 
> You are assuming that TS will be able to process both <valuable text>
> and <more valuable data>, even though it eats the garbage in the gap?
> That isn't guaranteed, due to possibly invalid byte sequences in the
> gap.

Yes, that's fair.

>> Alternatively, keeping the list of changes allows us to maintain a copy of 
>> the buffer that TS uses for scanning, with updates delayed until TS is done 
>> scanning.
> 
> Having a copy for each buffer that needs parsing doesn't scale.

Because of time, or because of memory?  

I though we assumed memory was a non-issue, because tree-sitter's data 
structures seem to require *a lot* more space than the text of the underlying 
buffer (in 2018 the main dev said "syntax trees still use over 10x as much 
memory as the size of the source file.").

Copying time can be an issue, for sure, but memcpy() is fast these days ^^




reply via email to

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