-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
room switch time is slow on a ~10 page roomlist due to forced layouts in _restoreSavedScrollState #14574
Comments
semi-related #14539 |
It takes 1-2 seconds to update the unnecessary highlight/rollover effects in Element, switching a room takes between 3 seconds (direct chats) and 10 seconds (medium to large rooms) now. |
on the surface this is a duplicate of #14539 however internally it's been noted that there's a particularly slow function in the room switch path. Edit: which is also listed in the title - I can read, I promise 😅 |
From the performance profile this is a regular issue and nothing to do with the new room list |
there's two kinds of updates we're doing:
We then repeat the two for a height update a moment later, however this seems better scoped and not actually an issue. |
and now by doing exactly nothing I've reduced this down from 30ms to 1ms. |
turns out if we simply add an if statement we can often save 28ms |
caught a capture of this where a room switch took well over 800ms (!!!!!!!!) with only about 10 rooms shown (not 10 pages, just 10 tiles). It looks like we're unmounting hundreds of components, then mounting hundreds more, and React is trying its best. Each mount only takes 0.12ms, but multiplied by a few hundred it starts to add up. It also looks like mine got caught by 2 GC's in the middle of switching, 15+ forced layouts, and what Chrome is calling a layout shift. The scroll state only accounts for ~100ms of this, so will need to investigate how we can possibly speed up the (un)mounting of event tiles. |
The profile hasn't improved but room switching feels faster with matrix-org/matrix-react-sdk#5034 - not sure how much of that is placebo. |
The room change time is still excruciatingly bad on my account (with ~300 rooms visible in the list) |
This issue continues to bite me, and it's making me consider using other apps just to get some work done. I can't wait multiple seconds to switch rooms :( |
takes ~1.2s to change room on Riot Nightly.
The text was updated successfully, but these errors were encountered: