Commit Graph

64 Commits

Author SHA1 Message Date
Damir Jelić
a6c962b9b0 chore: Fix the compilation of the benchmarks outside of the workspace root
The workspace root enables some features which are required to compile
the benchmarks, but if you decide to just compile the benchmarks these
features won't be enabled since they aren't specified in the Cargo.toml
file of the benchmarks.

Let's define all the required features so compilation works in both
cases.
2024-06-19 12:06:53 +02:00
Benjamin Bouvier
c72384f7d4 base: don't regenerate the display name when creating a room, store the cached display name in RoomInfo
So revert a few changes to make some functions async, etc.
2024-06-11 15:44:53 +02:00
Benjamin Bouvier
78e2ab9d99 base: make get_or_create_room async
Since this is a good place where to recompute the cached display name at
start.
2024-06-11 15:44:53 +02:00
Damir Jelić
dc60c1ee10 chore: Allow setting a custom vodozemac account 2024-05-28 12:43:49 +02:00
Damir Jelić
bb05b904cf feat(crypto): Allow the creation of an OlmMachine using a custom Account (#3451) 2024-05-24 10:54:21 +02:00
Timo Kösters
2f58cb1620 members: Simplify disambiguation logic when loading member list (#3184)
When all room members are loaded, we do not need an incremental member update. We know that parsing the /members response will only lead to more ambiguous names, not less. And because /members returns the complete list, we can directly use that list as the disambiguation map.

This improves the performance in my emulator from 56s to 9s and on a less performant device from 11mins to 11s (Tested experimentally on Matrix HQ using log statements in element android. If I have time, I will write a proper benchmark tomorrow.

See also https://github.com/matrix-org/matrix-rust-sdk/pull/3184#issuecomment-1986170631 for a more detailed benchmark run.

---

* members: Simplify disambiguation logic

* members: Prevent api misuse for receive_members

* members: Benchmark receive_all_members performance

* sdk: remove unused import

* sdk-base: rename `ApiMisuse` error to `InvalidReceiveMembersParameters`

* benchmarks: extract the member loading benchmark to `room_bench.rs`

* benchmarks: remove wiremock

* sdk-base: fix format

* sdk-base: try fixing tests

* benchmark: Provide some data to the store so the search and disambiguation happen

* benchmark: fix clippy

* benchmark: use a constant for `MEMBERS_IN_ROOM`

* sdk(style): reduce indent in `receive_all_members`

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benjamin Bouvier <public@benj.me>
2024-03-12 10:15:30 +00:00
Valere
88a70f472f Discard session API and bindings for Room (#2941)
Co-authored-by: Damir Jelić <poljar@termina.org.uk>
2024-02-20 13:36:55 +01:00
Jonas Platte
315e6c9d85 Use workspace dependencies for matrix-sdk-test 2024-01-05 12:58:54 +01:00
Jonas Platte
1c7bf820bf Use workspace dependencies for crates/* dependencies
… except from examples (such that they remain copy-pastable).
2024-01-04 10:02:07 +01:00
Jonas Platte
24b879bbc0 Clean up Cargo manifest formattting 2024-01-04 10:02:07 +01:00
Jonas Platte
c4724c082e Upgrade dependencies 2024-01-02 19:12:42 +01:00
Richard van der Hoff
086e988e68 crypto: Be consistent about /keys/query endpoint name
Sometimes, we called this `keys query`, sometimes `/keys/query`, and sometimes,
just for variety, `keys/query`. Generally in Matrix we talk about `/keys/query`
so let's standardise on that.
2023-11-22 14:02:39 +00:00
Benjamin Bouvier
b9b042ec4a chore(auth): prefix Session data structures with the auth kind 2023-09-15 13:03:11 +02:00
Benjamin Bouvier
7665b15c5a chore(auth): prefix SessionTokens data structures with the auth kind 2023-09-15 13:03:11 +02:00
Jonas Platte
3c8a59a43a Remove module::* imports 2023-08-24 12:28:34 +02:00
Jonas Platte
1c26069871 Make memory stores not clonable
It's not actually necessary and allows simplifying them.
2023-07-18 14:58:11 +02:00
Jonas Platte
b681f234a3 Upgrade criterion, pprof 2023-07-03 18:08:01 +02:00
Kévin Commaille
7298df0db6 sdk: Move Session and SessionTokens to matrix_auth
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-22 11:21:50 +02:00
Kévin Commaille
ea219d836e base: Do not separate stripped room info
Since stripped and non-stripped room infos use the same types,
the separation is not necessary anymore.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 10:45:37 +02:00
Jonas Platte
3e2bc3a514 Drop matrix-sdk-sled 2023-06-01 12:06:35 +02:00
Benjamin Bouvier
b6302aca5c bench: add benchmarks for encrypted stores too
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-05-15 17:11:50 +02:00
Benjamin Bouvier
3928259bb5 bench: add restore session benchmark
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-05-15 17:11:50 +02:00
Benjamin Bouvier
d6100915df bench: add sled back to the crypto benchmarks
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-05-11 12:31:58 +02:00
Benjamin Bouvier
5f228f408e bench: set up a Tokio context when dropping the sqlite store
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-05-11 12:31:58 +02:00
Kévin Commaille
d7e47501e3 benchmarks: Replace sled with SQLite
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-05-08 12:11:10 +02:00
dependabot[bot]
fc8cd2e7e5 chore(deps): bump tokio from 1.24.1 to 1.24.2
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-04 08:27:50 +01:00
Jonas Platte
2e30e11101 refactor: Use workspace dependencies for more crates 2023-01-10 10:19:02 +01:00
dependabot[bot]
63c8696cac chore(deps): bump tokio from 1.22.0 to 1.23.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.22.0 to 1.23.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.22.0...tokio-1.23.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-07 14:06:32 +01:00
Jonas Platte
d0609822bc refactor(sled)!: Rename SledCryptoStore::{open_with_passphrase => open}
`open_with_db` also has the passphrase parameter without mentioning it
in its name. The old name also sounded like the passphrase was required
when it's actually optional.
2022-12-07 11:16:25 +01:00
Jonas Platte
826705c174 chore: Bump MSRV to 1.65 2022-11-15 14:57:46 +01:00
Jonas Platte
ce966ed6ce chore: Upgrade criterion, pprof 2022-11-04 11:14:13 +01:00
Jonas Platte
f57b7782f4 refactor: Use workspace dependencies for ruma 2022-10-18 13:38:05 +02:00
Damir Jelić
2f94886663 refactor(crypto)!: Don't use the Curve25519 sender key to store room keys 2022-10-10 15:20:25 +02:00
Benjamin Kampmann
f1f1c1bba6 chore: Version bump 2022-09-28 17:07:37 +02:00
Jonas Platte
e46e13d1bf chore: Upgrade Ruma 2022-09-13 08:32:59 +00:00
Jonas Platte
c4d46f233e chore: Upgrade ruma 2022-09-02 15:03:00 +02:00
Jonas Platte
4be2f3aa04 chore: Upgrade ruma 2022-08-25 18:09:13 +02:00
Jonas Platte
9462061a5a chore: Upgrade ruma 2022-08-23 14:28:21 +02:00
Benjamin Kampmann
549c829000 chore: Update ruma 2022-08-18 15:52:08 +02:00
Jonas Platte
3581d83389 chore: Upgrade Ruma 2022-08-17 10:15:05 +02:00
Jonas Platte
158bd24b40 chore: Bump pprof dependency 2022-08-11 13:09:09 +02:00
Jonas Platte
a4f3c3a070 refactor!: Give sled / indexeddb types unique names 2022-08-04 17:04:31 +02:00
Benjamin Kampmann
2d21c30639 Merge remote-tracking branch 'origin/main' into gnunicorn/issue833 2022-08-01 13:28:28 +02:00
Jonas Platte
f8e729f7f3 chore: Use implicit named arguments for formatting macros more 2022-07-25 20:30:12 +02:00
Benjamin Kampmann
c070b96a68 Merge remote-tracking branch 'origin/main' into gnunicorn/issue833 2022-07-21 17:37:49 +02:00
Kévin Commaille
a6bd7fc82f chore: Update Ruma 2022-07-20 12:18:06 +00:00
Benjamin Kampmann
9502d32941 Merge remote-tracking branch 'origin/main' into gnunicorn/issue833 2022-07-19 12:03:47 +02:00
Johannes Becker
aa8206d6c8 chore: Bump ruma 2022-07-18 19:32:16 +02:00
Johannes Becker
f937d82336 chore: Bump ruma 2022-07-18 16:46:34 +00:00
Benjamin Kampmann
e3febd6f1f refactore(test): move testing out of regular build environment 2022-07-18 14:37:51 +02:00