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 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 element-hq/element-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)
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

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

@dbkr dbkr assigned lukebarnard1 and unassigned dbkr Mar 14, 2018
@lukebarnard1
Copy link
Contributor Author

@lampholder says we can merge following his QA

@lukebarnard1 lukebarnard1 merged commit 0d7099f into develop Mar 15, 2018
lukebarnard1 added a commit to element-hq/element-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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants