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

UI hangs several seconds, regulary #24091

Open
madduck opened this issue Dec 22, 2022 · 7 comments
Open

UI hangs several seconds, regulary #24091

madduck opened this issue Dec 22, 2022 · 7 comments
Labels
A-Composer A-Performance O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Cannot-Reproduce

Comments

@madduck
Copy link

madduck commented Dec 22, 2022

Steps to reproduce

Randomly, when trying to use Element-Web, I find that the UI stops responding for a few seconds at a time. When such is the case, character input isn't shown (but buffered, and after a few seconds, it'll appear in the input box). Also, interaction with other UI elements, such as context menus on individual posts, or the room list, isn't possible (no hover effects, and clicks don't have an immediate effect).

Outcome

It's quite hard to reproduce this in a meaningful way for this bug report, but I managed to capture a profile for the Firefox Profiler, and there you can see screenshots, as well as UI and network activity. I've put the profile up for download here

Check out this screenshot for now:

image

You can clearly see that everything seems to be blocking on a number of network requests, and in fact, it is during these two seconds that the UI wasn't responsive. So while the UI should never block on network, it does appear as if it does in this case.

Operating system

Debian Linux (unstable)

Browser information

Firefox 108

URL for webapp

develop.element.io and app.element.io

Application version

Both app and develop are affected:

  • Element version: 85e2f06-react-b81582d04569-js-aead401005fa
  • Element version: 1.11.17

Homeserver

matrix.madduck.net, Synapse 1.74.0

Will you send logs?

No

@germain-gg germain-gg added A-Performance X-Cannot-Reproduce S-Minor Impairs non-critical functionality or suitable workarounds exist O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed S-Minor Impairs non-critical functionality or suitable workarounds exist labels Jan 3, 2023
@germain-gg
Copy link
Contributor

The profiler does highlight anything too useful on the JS side.
We have blocking operation on the message composer (related to message encryption, when hitting the send button) and other bits with the TimelinePanel (about ~1.2s)

It seems that the Layout operation and the renderer are having a hard time with this setup for some reason

@madduck
Copy link
Author

madduck commented Jan 11, 2023

I don't think anymore it's network related. Instead, I found out about "Jank, event processing delays", which coincide exactly with the UI problems. It seems to suggest that the main loop is busy and blocks:

image

Here is the profiler data. The problem is at the end of the recording:
https://scratch.madduck.net/2023-01-11-FF108_profile.json.gz

@madduck
Copy link
Author

madduck commented Jan 12, 2023

Just letting you know that the problem exists with app.element.io as well.

@madduck
Copy link
Author

madduck commented Jan 25, 2023

Honestly, this is becoming a show-stopper, and I've now seen it happen to others. It also drives energy consumption of Firefox when idle, which is really not good. Should I stop using Element?

@t3chguy
Copy link
Member

t3chguy commented Feb 13, 2023

Looks like 86% of the load was in the Composer, so this is likely to be changed by the new WYSIWYG composer in labs. Also worth noting that at times in the profile your moz extensions hit nearly 50% usage, so likely with a clean browser profile the hanging would not occur.

@madduck
Copy link
Author

madduck commented Feb 13, 2023 via email

@t3chguy
Copy link
Member

t3chguy commented Feb 13, 2023

With the WYSIWYG composer, are you suggesting the Rich Text
replacement for Markdown? I find it very difficult to wrap my head
around the idea that a Rich Text Composer would solve a performance
problem sid to exist with a Markdown text area, but I've been wrong
before ;)

The WYSIWYG composer supports markdown also. It is a ground up rewrite including the majority in Rust. Both Rust and ground up rewrites tend to be good for performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Composer A-Performance O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Cannot-Reproduce
Projects
None yet
Development

No branches or pull requests

4 participants