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

Element-R: Will force download of member list during initial sync with lazy loading #26418

Closed
BillCarsonFr opened this issue Oct 23, 2023 · 1 comment · Fixed by matrix-org/matrix-js-sdk#3830
Assignees
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust A-Performance O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Labs

Comments

@BillCarsonFr
Copy link
Member

Steps to reproduce

  1. Login with an existing account with several big rooms

Outcome

What did you expect?

Lasy loading is enabled, to allow faster loading of rooms.

What happened instead?

For each of the rooms a loadRoomMember is called during the initial sync handling.

The rust crypto is doing that when handing the m.room.encryption state event:

https://github.com/matrix-org/matrix-js-sdk/blob/6e2ac03f7e130ec721fc67176883571547608ee6/src/rust-crypto/rust-crypto.ts#L1237

        // start tracking devices for any users already known to be in this room.
        const members = await room.getEncryptionTargetMembers();
        await this.olmMachine.updateTrackedUsers(members.map((u) => new RustSdkCryptoJs.UserId(u.userId)));

This will defeat lazy loading and make the initial sync slow.

Probably one of the source for #26352

Operating system

MacOs

Application version

No response

How did you install the app?

https://pr10080--matrix-react-sdk.netlify.app

Homeserver

No response

Will you send logs?

No

@BillCarsonFr BillCarsonFr added T-Defect A-Performance A-Element-R Issues affecting the port of Element's crypto layer to Rust labels Oct 23, 2023
@BillCarsonFr BillCarsonFr self-assigned this Oct 23, 2023
@richvdh
Copy link
Member

richvdh commented Oct 23, 2023

There are even tests for this in spec/integ/crypto/crypto.spec.ts which are disabled for the new backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust A-Performance O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Labs
Projects
None yet
3 participants