matrix-org / matrix-rust-sdk-crypto-wasm

Apache License 2.0
12 stars 7 forks source link

Use export_room_keys_stream to reduce export memory usage #105

Closed andybalaam closed 7 months ago

andybalaam commented 7 months ago

Applies on top of https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/106

Make use of the new export_room_keys_stream method from https://github.com/matrix-org/matrix-rust-sdk/pull/3144 to avoid one copy of the keys in the export process, by directly serialising to a JSON string, without taking the intermediate step into a Vec<ExportedRoomKey>.

Part of https://github.com/element-hq/element-web/issues/26681

andybalaam commented 7 months ago

lgtm. Is it already tested or could it benefit from a new test, at least validating what the return type actually is? Thanks!

It's already tested in machine.test.ts.