question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple seconds of lag when viewing/scrolling in specific Matrix room

See original GitHub issue

screenshot-2021-06-02-17:03:01

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:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jonas-schievinkcommented, Jun 6, 2021

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!

1reaction
robintowncommented, Jun 4, 2021

It looks like a large amount of that time is taken up by SettingsStore.getValue calls within shouldHideEvent. I might try replacing those with cached values from watchSetting to see if that could be a quick performance win.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found