Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove [0, -1] Identifier at the start of every character #13

Open
shanthanu9 opened this issue Jan 4, 2020 · 0 comments
Open

Remove [0, -1] Identifier at the start of every character #13

shanthanu9 opened this issue Jan 4, 2020 · 0 comments
Labels
optimization A possible optimization of existing implementation

Comments

@shanthanu9
Copy link
Member

shanthanu9 commented Jan 4, 2020

When the editor has

abc
def

The CRDT structure is

{: [[0, -1]]}, {a: [[0, -1], [1, 2]]}, {b: [[0, -1], [2, 2]]}, {c: [[0, -1], [3, 2]]}, {: [[0, -1], [4, -1]]}
{: [[0, -1], [4, -1]]}, {d: [[0, -1], [4, 2]]}, {e: [[0, -1], [5, 2]]}, {f: [[0, -1], [6, 2]]}, {: [[1, Infinity]]}

Every character has the [0, -1] identifier at the beginning. So while pushing operations to the channel, the first [0, -1] identifier can be skipped and when receiving operation, the [0, -1] identifier can be added back.

Saves network bandwidth and database storage space.

@shanthanu9 shanthanu9 added the optimization A possible optimization of existing implementation label Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization A possible optimization of existing implementation
Projects
None yet
Development

No branches or pull requests

1 participant