You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A sorted dictionary is a dictionary which allows O(1) value access by key, and maintains a well-defined ordering of keys.
This data representation is perfect for getting messages, where there are two key operations which ideally should run in O(1) time:
Get all messages / last K messages in order
Get 1 message by its ID
Proposed Solution
Explore using a sorted dictionary to store messages in memory. One issue is that I don't think pycrdt has a sorted dictionary shared type, but it may still be possible for each YChat instance to maintain its own sorted dictionary in-memory.
The text was updated successfully, but these errors were encountered:
Problem
A sorted dictionary is a dictionary which allows O(1) value access by key, and maintains a well-defined ordering of keys.
This data representation is perfect for getting messages, where there are two key operations which ideally should run in O(1) time:
Proposed Solution
Explore using a sorted dictionary to store messages in memory. One issue is that I don't think
pycrdt
has a sorted dictionary shared type, but it may still be possible for eachYChat
instance to maintain its own sorted dictionary in-memory.The text was updated successfully, but these errors were encountered: