KB1RD / matrix-notepad

A buggy way to collaborate on text documents using the Matrix protocol. When it works, consider this the Matrix Console of collaboration!
https://matrix-notepad.kb1rd.net/
GNU General Public License v3.0
67 stars 1 forks source link

Squashing #11

Open KB1RD opened 4 years ago

KB1RD commented 4 years ago

The current method of figuring out what the contents of the document are is to sync back to the start of the document. This means that the time to sync gradually increases and increases until the program becomes unusable. The only solution that I can think of this is to create "squash" messages that copy old messages into a single "squashed" message containing the text in a certain region. However, this creates a large problem. Let's say that early in the edit history somebody adds a paragraph or so that nobody changes later. Most likely, a smart algorithm would "squash" this paragraph relatively early on. This would require each client to still sync back that far to fetch any additions that could've been made to that squash since it was created. The solution, in my view, is to group messages associated with a certain squash together in a message thread. This is a WIP proposal for Matrix under issue https://github.com/matrix-org/matrix-doc/issues/1198. The requirements for threads to be used for squashing:

KB1RD commented 4 years ago

The current proposal linked in the matrix-doc issue appears to be perfect for this

KB1RD commented 4 years ago

As I hinted in Matrix Live, I'm leaning towards having an optional server API that can figure out the "head" events, i.e, the ones that have not been overwritten.