perf: reduce chat list and message handling latency

This commit is contained in:
liu weikai committed 2026-03-27 17:35:47 +08:00
1 parent 988827a3bc
commit df76526b5d
14 files changed
+376 -45

No files matched your search

@@ -77,6 +77,13 @@ class IChatStore
* @return true if updated
*/
virtual bool updateMessageStatus(MessageId msg_id, MessageStatus status) = 0;
/**
* @brief Flush pending buffered writes to persistent storage
*
* Default implementation is a no-op for stores that do not buffer.
*/
virtual void flush() {}
};
} // namespace chat
@@ -96,6 +96,7 @@ class ChatService
* @brief Process incoming messages (call from mesh task)
*/
void processIncoming();
void flushStore();
void addIncomingTextObserver(IncomingTextObserver* observer);
void removeIncomingTextObserver(IncomingTextObserver* observer);