add todo for future optimisation

This commit is contained in:
Bruno Windels 2020-09-24 10:35:09 +02:00
parent ece4840653
commit 4d616ce281

View File

@ -215,6 +215,8 @@ export class RoomEncryption {
* @return {Array<string>} 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);