[Top][All Lists]

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

Re: How to add pseudo vector types

From: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Wed, 21 Jul 2021 16:51:27 +0300

> 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

Without synchronization, you also risk reading invalid byte sequences
even outside the gap, because while you read part of a byte sequence,
some editing operation modifies the buffer at that very place.

> 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.

reply via email to

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