Skip to content

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

Description

@shanthanu9

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizationA possible optimization of existing implementation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions