Composer lag
Steps to reproduce
- Where are you starting? What can you see? Over the past week or so I've noticed worse and worse lag when typing in the normal, non-WYSIWYG composer.
I've been signed in forever, have slept/woken the computer a few times since the last reboot. There's no typing lag elsewhere on the machine.
Element is using between 5% and 30% CPU and ~1GB RAM. Machine specs:
- Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz 4.00 GHz
- 32.0 GB
- Windows 10 Pro 22H2 19045.3086
Outcome
What did you expect?
No lag
What happened instead?
Lag
Operating system
Windows 10
Application version
Element version: 1.11.34 Olm version: 3.2.14
How did you install the app?
Website
Homeserver
lant.uk
Will you send logs?
Yes
Chat effects such as confetti are also very slow.
Could be https://github.com/vector-im/element-web/issues/24091 or https://github.com/vector-im/element-web/issues/23268
@lampholder thank you for opening the issue. If possible, can you send logs when the composer is lagging? A profile would also help
I can't generate a profile out of Element Desktop on Windows - the profile generates but saving it saves an empty file.
I'm getting (less pronounced, but still noticeable) composer lag on Mac, too. I'll send logs for that (attached to this issue) and see if I can dump a profile out of Electron Mac
Nope, mac profiles also save as zero byte files.
Is this normal (from activity monitor on the mac)?:
Here's Element X for comparison:
My Electron instance does have encrypted search enabled:
I've filed another rageshake for this - on firefox at least I'm now seeing regular 10 second pauses interacting with the client at all (so not just typing into the composer, but scrolling/dismissing modals/even copying a link is blocked whilst the browser does whatever it's doing.
Firefox 2023-11-24 11.27 profile.json.gz
^ profiling info from Firefox while the composer was lagging (in Element R, local build, though, which muddies the water)
@andybalaam is it a development or production build? Development React builds are known to be laggy and it isn't something we can do much if anything about
@andybalaam is it a development or production build? Development React builds are known to be laggy and it isn't something we can do much if anything about
This was a dev build, so I guess ignore for now until I can get something more useful.
presumably it is no longer correct for this to be labelled as X-Needs-Info
I've got composer lag again having updated to Element version: 1.11.62 Crypto version: Olm 3.2.15 this morning :(
Suggestion from web team is that (on this occasion at least):
its likely due to https://github.com/element-hq/synapse/issues/16987 which causes https://github.com/element-hq/element-web/issues/27173
Aside from this, I haven't experience composer lag in recent versions prior to 1.11.62, so perhaps this issue can be closed.
so perhaps this issue can be closed
Please don't, I have this exact issue on 1.11.79, Crypto version: Rust SDK 0.7.2 (7a21514), Vodozemac 0.7.0
This has been happening to me, starting a few weeks ago, on Firefox 139 now, EW 1.11.103, downloaded from Github. This is the only place on my machine where I face considerable input lag. (It's an Intel Raptor Lake laptop, so relatively recent hardware.)
I can easily gather profile traces (using Firefox's built-in profiler) that show the problem, but I am not comfortable sharing them---they seem to contain screenshots, information on all my open tabs, all sorts of sensitive stuff...
So here I go copy-pasting screenshots instead. If you need more/different info, I would be happy to provide it. The main culprit seems to be a rapid growth of memory allocation while typing in the composer, see the memory bar in this screenshot:
That period of rapid growth (about 700M!) is when I was typing. The actual jank is then caused by GC pauses trying to cope with that memory growth. This screenshot has more information, including Firefox's helpful "Jank" metric building towards what looks like a run of the cycle collector ("CC"), if I'm understanding all of this correctly:
In my case, this may have something to do with the specific Firefox build I had been using. I was using the .deb package from Mozilla itself (on Debian Linux). Switching to Debian-packaged Firefox avoids the second-long lag I was experiencing.
Never mind, the Debian build has "caught up". As of Firefox 140, the Element Web composer is very laggy on Firefox, as described above.