mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-05 22:47:02 -04:00
This patch introduces the `RoomLoadSettings` enum. It is helpful to load either all rooms or one room when activating a `BaseClient`, i.e. when a session is initialized or restored. It addresses a broader problem where, for large accounts with large caches, creating a `BaseClient` takes many resources. In a resource constrainted context, like a push notification process, it can eat all resources up to the point the process is killed (then notifications can be missed). The idea is then to force the `BaseClient` to load a single room. This patch installs the `RoomLoadSettings` argument everywhere it needs to be. The next patch will use `RoomLoadSettings` to load either all rooms or a single one.