add comment about possible future optimization
This commit is contained in:
parent
1278288a42
commit
2943cb525f
1 changed files with 4 additions and 0 deletions
|
@ -76,6 +76,10 @@ export class Room extends BaseRoom {
|
||||||
let eventsToDecrypt = roomResponse?.timeline?.events || [];
|
let eventsToDecrypt = roomResponse?.timeline?.events || [];
|
||||||
// when new keys arrive, also see if any older events can now be retried to decrypt
|
// when new keys arrive, also see if any older events can now be retried to decrypt
|
||||||
if (newKeys) {
|
if (newKeys) {
|
||||||
|
// TODO: if a key is considered by roomEncryption.prepareDecryptAll to use for decryption,
|
||||||
|
// key.eventIds will be set. We could somehow try to reuse that work, but retrying also needs
|
||||||
|
// to happen if a key is not needed to decrypt this sync or there are indeed no encrypted messages
|
||||||
|
// in this sync at all.
|
||||||
retryEntries = await this._getSyncRetryDecryptEntries(newKeys, roomEncryption, txn);
|
retryEntries = await this._getSyncRetryDecryptEntries(newKeys, roomEncryption, txn);
|
||||||
if (retryEntries.length) {
|
if (retryEntries.length) {
|
||||||
log.set("retry", retryEntries.length);
|
log.set("retry", retryEntries.length);
|
||||||
|
|
Reference in a new issue