Multiple seconds of lag when viewing/scrolling in specific Matrix room
See original GitHub issue
Description
Scrolling in the #keepassxc:matrix.org room causes a large amount of lag, during which all inputs are ignored and at least 1 CPU core is pegged.
Steps to reproduce
- Join the room above with Element
- That should already reproduce it. If not, scroll upwards a bit.
Logs being sent: yes
Version information
- Platform: web
For the web app:
- Browser: Firefox 88.0.1
- OS: Arch Linux
- URL: app.element.io
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Scrolling DIV causing browser lag - javascript - Stack Overflow
Try creating a new GPU layer by adding -webkit-transform: translateZ(0); to it and see if it scrolls smoother. – damian. Jun 30, 2014...
Read more >Improving jumps on timeline pagination/scrolling #8565 - GitHub
To maintain scroll position after the portion above the viewport changes height, we need to set the scrollTop, as we cannot balance it...
Read more >Slow stuttering zooming when reading PDF - Apple Community
It is most pronounced with zooming, but there is usually a slight pause when scrolling to next page (this is with continuous scroll...
Read more >First impressions ... lag issues! - Matrix Games Forums
Sometimes the actual "windows based" menus and dialogs have very little lag, other times they have some lag, but invariably the map has...
Read more >Gallery scrolling performance issues
While the lag you see might be "acceptable", it's not a great user ... when user scrolls and then has to wait several...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The multi-second spikes seem to be gone now, although my flamegraph looks basically the same as the one you posted in https://github.com/vector-im/element-web/issues/17537#issuecomment-853475149.
I’m now testing on a different room that has even worse performance issues,
#glasgow:libera.chat, and switching to that room causes the spinner to flicker in and out of existence a lot, while also spending a lot of time in_getEventTiles, and causing a lot of lag while it’s loading (giving maybe 1-2 frames per second on my machine until it is done loading).Thanks for looking into this!
It looks like a large amount of that time is taken up by
SettingsStore.getValuecalls withinshouldHideEvent. I might try replacing those with cached values fromwatchSettingto see if that could be a quick performance win.