-
Notifications
You must be signed in to change notification settings - Fork 247
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
feat(base) Client-side sorting, prelude: Implement Client::rooms_stream
#3068
Commits on Jun 17, 2024
-
feat(base): Make
Store::rooms
observable.This patch updates `Store::rooms` from a `Arc<StdRwLock<BTreeMap<OwnedRoomId, Room>>>` to a `Arc<StdRwLock<Rooms>>` where `Rooms` is a new type that mimics a `BTreeMap` but that is observable. It uses an `ObservableVector` for saving us the costs of writing a new `ObservableMap` type in `eyeball-im`. It would have too much implications that are clearly not necessary. The major one being that an `ObservableMap` must emit `MapDiff`, but we expect `VectorDiff` everywhere in the SDK where rooms are observable. It would break too many API and too many projects. The benchmark is coming, but here are the results (for 10'000 rooms, extreme case): * `get_rooms` and `get_rooms_filtered` are twice faster (in practise, it means 650µs is saved per call), * `get_room` and `get_or_create_room` are 10% slower (in practise, it means 8-10ns is lost per call). Overall, I believe these results are acceptable, and even an improvement for the first one.
Configuration menu - View commit details
-
Copy full SHA for 5870daf - Browse repository at this point
Copy the full SHA 5870dafView commit details -
feat(base): Rename
Rooms
to genericObservableMap
+ add tests.This patch rewrites `Rooms` to a generic `ObservableMap` struct. It also adds documentation and tests for this type.
Configuration menu - View commit details
-
Copy full SHA for a67e7f2 - Browse repository at this point
Copy the full SHA a67e7f2View commit details -
feat(base): Implement
ObservableMap::stream
.This patch basically implements `ObservableMap::stream` which returns a batched stream of the values.
Configuration menu - View commit details
-
Copy full SHA for 6dac77f - Browse repository at this point
Copy the full SHA 6dac77fView commit details -
feat(base): Implement
Store::rooms_stream
.This patch implements a new `Store::rooms_stream` method that forwards the result of `ObservableMap::stream`.
Configuration menu - View commit details
-
Copy full SHA for 11bced4 - Browse repository at this point
Copy the full SHA 11bced4View commit details -
fix(base): Define
matrix_sdk_base::latest_event
also if `e2e-encryp……tion` is enabled. Running `cargo test -p matrix-sdk-base --features e2e-encryption` makes the code to fail to compile because `crate::latest_event` isn't defined. And indeed, it must be defined if `experimental-sliding-sync` is enabled, but also if `e2e-encryption` is enabled.
Configuration menu - View commit details
-
Copy full SHA for fd4505b - Browse repository at this point
Copy the full SHA fd4505bView commit details -
feat(base): Implement
Client::rooms_stream
.This patch implements `Client::rooms_stream`, which forwards the result of the recently added `Store::rooms_stream` method.
Configuration menu - View commit details
-
Copy full SHA for f9e8f11 - Browse repository at this point
Copy the full SHA f9e8f11View commit details -
test: Fix a compiler warning if
e2e-encryption
and `experimental-sl……iding-sync` aren't enabled.
Configuration menu - View commit details
-
Copy full SHA for e028710 - Browse repository at this point
Copy the full SHA e028710View commit details -
feat(sdk): Implement
Client::rooms_stream
.This patch implements `Client::rooms_stream` by forwarding the result of `matrix_sdk_base::Client::rooms_stream`, and mapping the `matrix_sdk_base::Room` to `matrix_sdk::Room`.
Configuration menu - View commit details
-
Copy full SHA for 6e7f53d - Browse repository at this point
Copy the full SHA 6e7f53dView commit details -
feat(base): Create an
ObservableMap
forwasm32-unknown-unknown
.This patch creates an `ObservableMap` for `wasm32-unknown-unknown` which simply wraps a `BTreeMap`, and without the `stream` method. Indeed, the first implementation uses `eyeball_im::ObservableVector` which requires `Send` and `Sync` on its values, which cannot compile to Wasm.
Configuration menu - View commit details
-
Copy full SHA for e9121ab - Browse repository at this point
Copy the full SHA e9121abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 01d6a9e - Browse repository at this point
Copy the full SHA 01d6a9eView commit details
Commits on Jun 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for dd2ef57 - Browse repository at this point
Copy the full SHA dd2ef57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e639c4 - Browse repository at this point
Copy the full SHA 1e639c4View commit details -
test(sdk): Test
Client::rooms_stream
.This patch adds an integration test for `Client::rooms_stream`.
Configuration menu - View commit details
-
Copy full SHA for 717c68d - Browse repository at this point
Copy the full SHA 717c68dView commit details