RocketChat/EmbeddedChat

[Feat]: Optimize real-time sidebar fetching

Spiral-Memory opened this issue · 8 comments

As an EmbeddedChat developer,

I need to:
Find better ways to filter messages in sidebars
So That:
There must be a smooth experience while chatting even when the sidebar is opened.
Acceptance Criteria

  • Optimize sidebar for "Thread Messages, Pinned Messages, Starred Messages, and Mentioned Messages"

Working on this!
Thinking about better approach and also, looking for awesome ideas and discussions from others.

can i contribute in this issue ?

Yes sure, would love to see if you can find a way to optimise it

Let me tell you the current problem. Currently, we use messagesStore to filter out the messages and display them on the sidebar. This process can be a little slow when there are tons of messages in the array.

Additionally, when the sidebar is opened and you send a message, it reiterates to filter the messages, which results in computation for every message.

We want to find a way to filter only when the message matches the filter criteria. This information can be obtained through real-time WebSocket communication. This can be one approach, would love to see a optimised approach