Skip to content
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

Faster member list by avoiding many FFI calls #2322

Merged
merged 4 commits into from
Mar 5, 2024
Merged

Conversation

timokoesters
Copy link
Contributor

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other : Performance Improvement

Content

This makes it much faster to load room members by avoiding FFI calls, corresponding to matrix-org/matrix-rust-sdk#3074

Motivation and context

matrix-org/matrix-rust-sdk#1979

Tests

  • Open matrix hq, click member list

Tested devices

  • Physical
  • Emulator
  • OS version(s): API 34

Checklist

@timokoesters timokoesters requested a review from a team as a code owner January 30, 2024 15:17
@timokoesters timokoesters requested review from jmartinesp and removed request for a team January 30, 2024 15:17
@timokoesters
Copy link
Contributor Author

I did not mean to PR the other commits

@timokoesters
Copy link
Contributor Author

Probably code should be deduplicated between ExportedRoomMemberMapper.kt and RoomMemberMapper.kt

@bmarty
Copy link
Member

bmarty commented Jan 30, 2024

I did not mean to PR the other commits

Did you start the branch timo/fastmembers from latest develop? It seems to be based on misc/jme/sdk-type-event-filter.

@jmartinesp
Copy link
Contributor

jmartinesp commented Jan 30, 2024

I did not mean to PR the other commits

Did you start the branch timo/fastmembers from latest develop? It seems to be based on misc/jme/sdk-type-event-filter.

Yeah, this PR can only be merged after a new SDK version is integrated too. Maybe you can make it a draft for now @timokoesters ? We can take a look after that and rebase the branch.

We also need this PR to be merged first: matrix-org/matrix-rust-sdk#3074

Copy link
Contributor

github-actions bot commented Mar 1, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/agYQf9

@@ -21,10 +21,10 @@ import io.element.android.libraries.matrix.api.room.RoomMember
import io.element.android.libraries.matrix.api.room.RoomMembershipState
import uniffi.matrix_sdk.RoomMemberRole
import org.matrix.rustcomponents.sdk.MembershipState as RustMembershipState
import org.matrix.rustcomponents.sdk.ExportedRoomMember as RustExportedRoomMember
import org.matrix.rustcomponents.sdk.RoomMember as RustRoomMember

object ExportedRoomMemberMapper {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename this struct and the file again too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@jmartinesp
Copy link
Contributor

I rebased the PR contents after merging the new SDK version, this should be ready to review now.

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.82%. Comparing base (05ca8c9) to head (6eb8c99).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2322   +/-   ##
========================================
  Coverage    72.82%   72.82%           
========================================
  Files         1374     1374           
  Lines        32723    32723           
  Branches      6358     6358           
========================================
  Hits         23829    23829           
  Misses        5585     5585           
  Partials      3309     3309           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp marked this pull request as ready for review March 5, 2024 08:01
@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Mar 5, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Mar 5, 2024
Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@jmartinesp jmartinesp merged commit 38cea8e into develop Mar 5, 2024
18 checks passed
@jmartinesp jmartinesp deleted the timo/fastmembers branch March 5, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants