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

Increased room loading times with link previews enabled (on desktop after v1.11.81) #1983

Open
krassle opened this issue Nov 8, 2024 · 6 comments
Labels
A-Performance A-URL-Previews 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

Comments

@krassle
Copy link

krassle commented Nov 8, 2024

Steps to reproduce

  1. Open Element Desktop
  2. Switch to a room with inline URL previews enabled and lots of links inside (e.g. news-feeds)
  3. Observe loading times of up to 9-10 seconds
  4. Be stuck until avatars and link previews are fully loaded
  5. Also observe: timeline scrolling isn't smooth like before
  6. Issue appears on every room switch, not just the fist one

Additional info:

Issue first started with release 1.11.82 of Element Desktop (persists with .83/.84).
Reverting back to 1.11.81 fixes the issue (loading times back to normal 1-2 seconds and smooth scrolling).
Comparing 1.11.81...1.11.82 - not much changed there. Perhaps someone can spot the regression introduced...

Important: Element Web appears to be unaffected by this.

(Chrome DevTools) Performance - screenshot of room loading times

Bildschirmfoto_2024-11-08_16-05-01

(Chrome DevTools) Console logs - nothing really helpful

vector-1731079305676.log

Outcome

What did you expect?

Short loading times of max. 1-2 seconds(when switching rooms) and smooth scrolling

What happened instead?

Loading times increased by a factor of 5 after v1.11.81

Operating system

Debian Linux

Application version

Element version: 1.11.84

How did you install the app?

https://packages.element.io/debian

Homeserver

Synapse 1.118.0

Will you send logs?

Yes

@dosubot dosubot bot added A-Performance A-URL-Previews O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Nov 8, 2024
@t3chguy
Copy link
Member

t3chguy commented Nov 8, 2024

Comparing 1.11.81...1.11.82 - not much changed there. Perhaps someone can spot the regression introduced...

The change would be in element-web or matrix-react-sdk

@krassle
Copy link
Author

krassle commented Nov 8, 2024

Forgot to attach the performance tab of the unaffected v1.11.81

(Chrome DevTools) Performance Recorder - v1.11.81

Bildschirmfoto_2024-11-08_18-38-57

@t3chguy
Copy link
Member

t3chguy commented Nov 8, 2024

Important: Element Web appears to be unaffected by this.

Element Desktop is just Element Web + Electron so that seems odd.

v1.11.82 switched the room header implementation and there are complaints of performance issues with that: element-hq/element-web#28273

@krassle
Copy link
Author

krassle commented Nov 8, 2024

@t3chguy
I have no idea why Element Web would behave differently than Element Desktop, but on my self-hosted Element Web instance the issue is not reproducible on any version between 1.11.81 and 1.11.84. So, it must be some minor code difference affecting only Desktop, as Electron was not updated to a new major version ...

@t3chguy
Copy link
Member

t3chguy commented Nov 8, 2024

So, it must be some minor code difference affecting only Desktop, as Electron was not updated to a new major version ...

There is no Desktop code for URL previews, its just the Element web embedded within Electron responsible for it

@krassle
Copy link
Author

krassle commented Nov 11, 2024

Important: Element Web appears to be unaffected by this.

Element Desktop is just Element Web + Electron so that seems odd.

v1.11.82 switched the room header implementation and there are complaints of performance issues with that: element-hq/element-web#28273

The issue you mentioned (about the new room headers) maybe not linked to this one after all, then:

  1. it is reported to affect rooms with many participants(e.g. Matrix-HQ), where this one is about rooms with only the RSS-Bot inside
  2. it emphasizes the high CPU usage and not the increased room loading times
  3. it appears to affect both Element Web & Element Desktop, where here clearly only Element Desktop is affected

But then URL previews may also have less or nothing to do with this problem... A recent unresolved issue(Media redirect target URL gets modified by Element Desktop #1924) leads me to suspect that recently introduced target URL rewriting may somehow negatively interfere with loading / fetching (or caching) of media-thumbnails in some reverse proxy or media content repository scenarios. The author also explicitly points out the different behavior between Element Web and Desktop in this regard.

Please let me know if I can perform any more debugging steps to help narrow it down.
Thanks.

@dbkr dbkr added O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed O-Occasional Affects or can be seen by some users regularly or most users rarely labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Performance A-URL-Previews 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
Projects
None yet
Development

No branches or pull requests

3 participants