Skip to content

Batching of requests from KeyClaimManager.ensureSessionsForUsers() #4468

@hughns

Description

@hughns

Currently the rust crypto will do a single key claim request irrespective of the number of users and devices requested:

const claimRequest = await this.olmMachine.getMissingSessions(userList.map((u) => u.clone()));
if (claimRequest) {
logger.info("Making /keys/claim request");
await this.outgoingRequestProcessor.makeOutgoingRequest(claimRequest);
}

It would make sense to batch this at an appropriate batch size.

n.b. I don't know whether this should be done by making getMissingSessions() return multiple requests, or splitting the requests in KeyClaimManager. Presumably this behaviour might be of concern for the matrix-rust-sdk too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Element-RIssues affecting the port of Element's crypto layer to RustT-Enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions