From 1117c77d05f00501a3560a72cf265c7b09be3732 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 1 Oct 2020 14:36:00 +0200 Subject: [PATCH] note for future optimisation --- src/matrix/room/timeline/persistence/SyncWriter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/matrix/room/timeline/persistence/SyncWriter.js b/src/matrix/room/timeline/persistence/SyncWriter.js index 7f2275b1..231f7295 100644 --- a/src/matrix/room/timeline/persistence/SyncWriter.js +++ b/src/matrix/room/timeline/persistence/SyncWriter.js @@ -104,6 +104,8 @@ export class SyncWriter { const memberChange = new MemberChange(this._roomId, event); const {member} = memberChange; if (member) { + // TODO: can we avoid writing redundant members here by checking + // if this is not a limited sync and the state is not in the timeline? txn.roomMembers.set(member.serialize()); return memberChange; }