Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
florianduros opened this issue Nov 26, 2024 · 0 comments
Labels
A-E2EE S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@florianduros
Copy link
Contributor

florianduros commented Nov 26, 2024

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);
}

@dosubot dosubot bot added the A-Testing Testing, code coverage, etc. label Nov 26, 2024
@florianduros florianduros changed the title cryptoApi. isEncryptionEnabledInRoom is taking up to 4sec to respond in decryption-failure-messages.spec.ts > decryption failure messages cryptoApi. isEncryptionEnabledInRoom is slow in decryption-failure-messages.spec.ts > decryption failure messages Nov 26, 2024
@florianduros florianduros changed the title cryptoApi. isEncryptionEnabledInRoom is slow in decryption-failure-messages.spec.ts > decryption failure messages cryptoApi.isEncryptionEnabledInRoom is slow in decryption-failure-messages.spec.ts > decryption failure messages Nov 26, 2024
@florianduros florianduros added S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed A-Testing Testing, code coverage, etc. labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

1 participant