mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-24 17:18:23 -04:00
This patch changes the `SlidingSync::subscribe_to_room` method to `subscribe_to_rooms`. Note the plural form. It's now mandatory to subscribe to a set of rooms. The idea is to avoid calling this method repeatedly. Why? Because each time the method is called, it sends a `SlidingSyncInternalMessage` of kind `SyncLoopSkipOverCurrentIteration`, i.e. it cancels the in-flight sliding sync request, to start over with a new one (with the new room subscription). A problem arises when the async runtime (here, Tokio) is busy: in this case, the internal message channel can be filled pretty easily because its size is 8. Messages are not consumed as fast as they are inserted. By changing this API: subscribing to multiple rooms will result in a single internal message, instead of one per room. Consequently, the rest of the patch moves the `subscribe` method of `room_list_service::Room` to `room_list_service::RoomListService` because it now concerns multiple rooms instead of a single one.
Experiments
This directory contains experiments, work-in-progress crates, or other code and documentation, that
do not fall under the same stability guarantees as the main crates (matrix-sdk,
matrix-sdk-crypto, etc.).
Lab projects might be abandoned and possibly removed at any time.
That said, this directory is meant to freely explore unconventional or interesting ways the Matrix Rust SDK can evolve, feel free to propose an experiment.
Current experiments
- multiverse: a TUI client mostly for quick development iteration of SDK features and debugging.
Run with
cargo run --bin multiverse matrix.org ~/.cache/multiverse-cache.
Archived experiments
Link to PR that deleted the experiment from the repo, newest first: