emacs-devel
[Top][All Lists]
Advanced

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

Re: Question collaborative editing.


From: Qiantan Hong
Subject: Re: Question collaborative editing.
Date: Wed, 30 Sep 2020 00:47:59 +0000

I would be concerned about the performance (but I am paranoid about
Emacs performance anyway so don't worry for that). AFAIR emacs buffers
are stored in a contiguous way (I may be wrong) and in that case the
search with CRDT may be expensive. At least as it was explained here (in
the optimization section):

https://conclave-team.github.io/conclave-site/

Unless some extra optimizations are implemented of course.
Yes, I’m also concerning that, but nobody knows without trying it
out. At least in principle, text-property-search-* and *-property-change
are C primitives and should be really fast. Also, there’s caching trick
used in Yjs described here 
https://github.com/yjs/yjs/blob/main/INTERNALS.md#item-storage

On the other hand the text-property/gap-array data structure in
emacs seems to save us from using double linked list, since
the total order is just reflected in the continuous buffer.

In any case I’m afraid its possible to do it for normal size buffer
but it won’t scale for really large buffers — I imagine when buffer
is large enough, the cost of even roaming around the buffer
(possibly using the position cache) to look for place to insert
will be unacceptable, because moving in gap array takes copying
cost proportional to moving distance (I might be wrong)…
But I guess let’s assume people are not going to collaborative edit
some 10MB log file.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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