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

Improve room list performance when receiving messages #1801

Merged
merged 2 commits into from Mar 15, 2018

Conversation

@lukebarnard1
Copy link
Contributor

lukebarnard1 commented Mar 14, 2018

In summary this makes RoomTiles (and RoomAvatars) do more for
themselves in terms of reacting individually to state changes in
the js-sdk.

Instead of force updating the entire room list for avatar changes
and room name changes, do this in the RoomTile and RoomAvatar
instead. This increases the number of listeners listening to the
matrix client, but allows us to properly implement a
shouldComponentUpdate for RoomTile (because the avatar, name and
notification count are now in component state).

Mitigates vector-im/riot-web#6060

In summary this makes RoomTiles (and RoomAvatars) do more for
themselves in terms of reacting individually to state changes in
the js-sdk.

Instead of force updating the entire room list for avatar changes
and room name changes, do this in the RoomTile and RoomAvatar
instead. This increases the number of listeners listening to the
matrix client, but allows us to properly implement a
shouldComponentUpdate for RoomTile (because the avatar, name and
notification count are now in component state)
@dbkr
dbkr approved these changes Mar 14, 2018
Copy link
Member

dbkr left a comment

lgtm! Leaving it to you to merge with tests as appropriate.

@dbkr dbkr assigned lukebarnard1 and unassigned dbkr Mar 14, 2018
@lukebarnard1

This comment has been minimized.

Copy link
Contributor Author

lukebarnard1 commented Mar 14, 2018

@lampholder says we can merge following his QA

@lukebarnard1 lukebarnard1 merged commit 0d7099f into develop Mar 15, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
lukebarnard1 added a commit to vector-im/riot-web that referenced this pull request Mar 16, 2018
so that the notification count is updated.

Previously we relied on a force update from RoomList, which was
removed as part of the optimisations in
  matrix-org/matrix-react-sdk#1801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.