From 4d616ce2812e7e9c2b6f497289111d45724ae37e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 24 Sep 2020 10:35:09 +0200 Subject: [PATCH] add todo for future optimisation --- src/matrix/e2ee/RoomEncryption.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/matrix/e2ee/RoomEncryption.js b/src/matrix/e2ee/RoomEncryption.js index dac362c0..2c23933d 100644 --- a/src/matrix/e2ee/RoomEncryption.js +++ b/src/matrix/e2ee/RoomEncryption.js @@ -215,6 +215,8 @@ export class RoomEncryption { * @return {Array} the event ids that should be retried to decrypt */ getEventIdsForRoomKey(roomKey) { + // TODO: we could concat both results here, and only put stuff in + // candidates if it is not in missing sessions to use a bit less memory let eventIds = this._missingSessions.getEventIds(roomKey.senderKey, roomKey.sessionId); if (!eventIds) { eventIds = this._missingSessionCandidates.getEventIds(roomKey.senderKey, roomKey.sessionId);