Limit in memory messages #183

Closed
opened 2026-04-09 21:15:10 +00:00 by theAnuragMishra · 2 comments
Contributor

Currently we do not have any limits to how many messages live in memory. This means the memory usage could in theory grow indefinitely.
Would it be okay to keep only n most recent messages in memory and pop off the least recent one whenever a new one arrives?
Part of #182

Currently we do not have any limits to how many messages live in memory. This means the memory usage could in theory grow indefinitely. Would it be okay to keep only `n` most recent messages in memory and pop off the least recent one whenever a new one arrives? Part of #182
Owner

All events are in memory anyway (hopefully shared references, although I don't know how to validate that). A virtual scroll component might be helpful for reducing how many messages are in the dom at a time, although it may be a pretty difficult thing to get right (we do lots of scroll management and sometimes navigate to a particular point in time within a room). But feel free to explore and see what might work.

All events are in memory anyway (hopefully shared references, although I don't know how to validate that). A virtual scroll component might be helpful for reducing how many messages are in the dom at a time, although it may be a pretty difficult thing to get right (we do lots of scroll management and sometimes navigate to a particular point in time within a room). But feel free to explore and see what might work.
Author
Contributor

Understandable yeah. JS defaults to references for objects so basically shared TrustedEvents.

Understandable yeah. JS defaults to references for objects so basically shared TrustedEvents.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/flotilla#183