note for future optimisation

This commit is contained in:
Bruno Windels 2020-10-01 14:36:00 +02:00
parent d5a6a4d350
commit 1117c77d05

View file

@ -104,6 +104,8 @@ export class SyncWriter {
const memberChange = new MemberChange(this._roomId, event); const memberChange = new MemberChange(this._roomId, event);
const {member} = memberChange; const {member} = memberChange;
if (member) { 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()); txn.roomMembers.set(member.serialize());
return memberChange; return memberChange;
} }