Skip to content

cryptoApi.isEncryptionEnabledInRoom is slow in decryption-failure-messages.spec.ts > decryption failure messages  #4557

Open
@florianduros

Description

@florianduros

When working on element-hq/element-web#28278 to migrate to use cryptoApi.isEncryptionEnabledInRoom, the test decryption-failure-messages.spec.ts > decryption failure messages was in failure when https://github.com/element-hq/element-web/blob/de820e11fc2bc20eb608055205e1e44d11f2c740/playwright/e2e/crypto/decryption-failure-messages.spec.ts#L70-L72 is tested.

It's failing because the room is taking too much time to be displayed because cryptoApi. isEncryptionEnabledInRoom is taking up to 4sec to respond in this case.

this.olmMachine.getRoomSettings(new RustSdkCryptoJs.RoomId(roomId)); call is causing this slowness:

/**
* Implementation of {@link CryptoApi#isEncryptionEnabledInRoom}.
*/
public async isEncryptionEnabledInRoom(roomId: string): Promise<boolean> {
const roomSettings: RustSdkCryptoJs.RoomSettings | undefined = await this.olmMachine.getRoomSettings(
new RustSdkCryptoJs.RoomId(roomId),
);
return Boolean(roomSettings?.algorithm);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-E2EES-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions