josephg / josephg/ShareJS

Combine operations retroactively

Open
#318 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
454
PR merge metrics
No merged PRs in 30d

Description

Is there currently a way to merge past operations? I can see large collaborative documents amassing tens of or even hundreds of thousands of operations over time, which is pretty data and runtime inefficient. It makes much more sense to keep old (like a few months old) changes that are on a larger scale - say sentences long changes instead of letter long changes. I would imagine that this would allow you to retrieve document state at an earlier time more efficiently, considering that you would need to invert and apply less operations.

Some kind of support for retroactively combining operations while maintaining intention preservation would be great.

Something that would also be great, but is perhaps out of the scope of this library would be to maintain a redis copy of the data in memory for active documents (with an arbitrary definition of "active"), and then merge an arbitrary number of changes and push a small number of larger operations to the main database every once in a while. This would theoretically greatly reduce database traffic and also speed up the process of sending out applied changes to the other clients.

As is the same with my previous issue request, I might end up tackling this myself if there is no current support for it - so any suggestions would be welcome.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.