Skip to content

Improve performance of Splay Tree in crdt.Text data structure to prevent skewness #906

@m4ushold

Description

@m4ushold

Description:
In the crdt.Text data structure, Splay trees are used, and while they are efficient when performing operations sequentially within a contiguous range, they suffer from the issue of becoming skewed when elements are sequentially inserted. This leads to a linear arrangement in the tree. In a tree with N vertices, performing M operations guarantees O((N+M) log N) time. However, if the tree becomes skewed, each operation may initially take O(N) time before returning to more efficient performance. This issue can cause performance degradation in the crdt.Text data structure, making it crucial to explore methods to prevent skewness and maintain efficiency.

Why:
To maintain and enhance the performance and efficiency of the crdt.Text data structure in the face of potential skewness issues in the Splay trees. And If a single operation takes O(n) time, the responsiveness of the editing environment will degrade.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions