-
Notifications
You must be signed in to change notification settings - Fork 116
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
Remove unnecessary Room.updateMembers()
calls.
#2564
Remove unnecessary Room.updateMembers()
calls.
#2564
Conversation
Some of them can be directly removed since we have a way to automatically get member info updates based on membership changes. Others can be replaced by a simpler `getUpdatedMember` method. This might still need a full member sync, but it's quite unlikely.
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2564 +/- ##
===========================================
- Coverage 73.14% 73.14% -0.01%
===========================================
Files 1408 1408
Lines 34103 34102 -1
Branches 6620 6620
===========================================
- Hits 24945 24944 -1
Misses 5698 5698
Partials 3460 3460 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM at first sight. Thanks!
|
Type of change
Content
Remove unnecessary
Room.updateMembers()
calls.Some of them can be directly removed since we have a way to automatically get member info updates based on membership changes.
Others can be replaced by a simpler
getUpdatedMember(userId)
method. This might still do a full member sync, but it's quite unlikely, and even if it does it we won't have to map every fetched user before we can use the result.Motivation and context
After testing the improved room member list and
updateMembers()
sometimes causing 45MB of data to be loaded for the Matrix HQ room, I want to reduce these calls as much as possible. It should also improve performance since we avoid unnecessary data mapping.Tests
There should be no changes. I tested the following flows:
As far as I could tell they all still worked as expected.
Tested devices
Checklist