Skip to content

New room list: Account performance stage 1 #14034

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

Closed
2 tasks done
turt2live opened this issue Jun 15, 2020 · 1 comment
Closed
2 tasks done

New room list: Account performance stage 1 #14034

turt2live opened this issue Jun 15, 2020 · 1 comment

Comments

@turt2live
Copy link
Member

turt2live commented Jun 15, 2020

  • Medium (~500 rooms) not noticed
  • Large (TravisR or Matthew sized) is usable.
@turt2live turt2live self-assigned this Jun 15, 2020
turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Jun 18, 2020
For element-hq/element-web#14034

One of the largest issues with room switching was that we'd regenerate the entire list when the sticky room changes, which is obviously detrimental on larger accounts (and even some medium accounts). To work through this, we simply handle the NewRoom and RoomRemoved causes (used by the sticky room handling) as splices rather than in-place updates.

Overall this leads to a smoother experience as it means we're doing far less calculations and can even opt out of an update if it isn't required, such as a RoomRemoved cause being fired twice - the second one can result in an update not being required, saving render time.

This commit also includes a fix for handling update causes on the sticky room, as the room list loves to print errors when this happens. We don't need to handle any updates because once the sticky room changes it'll get re-added through NewRoom, causing the underlying algorithm to slot it in where needed, effectively handling all the missed updates.
@turt2live
Copy link
Member Author

In practice large accounts are usable but not perfect. Perfection is #14035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants