bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

WhatsApp Web unuseable slow for longer conversations due to sync layout flush on input events

NEW
Unassigned

Status

()

Core
Layout
P3
normal
a year ago
2 months ago

People

(Reporter: Clemens Eisserer, Unassigned, NeedInfo)

Tracking

(Depends on: 2 bugs, {perf})

55 Branch
x86_64
All
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 wontfix)

Details

(Whiteboard: [qf:p3])

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170626235638

Steps to reproduce:

Use WhatsApp web with Firefox ( https://web.whatsapp.com/ )


Actual results:

For longer conversions Firefox starts to become very sluggish. Not only scrolling through the conversion or selecting text is slow, even typing when writing a new message can slow down to 1 character per second. 

All in all, this makes Firefox almost unuseable with WhatsApp web: https://youtu.be/94yIvWMhtLM


Expected results:

Firefox should perform like Chrome, which has no issues at all with long WhatsApp conversions.
(Reporter)

Comment 1

a year ago
unfortunately the content of the text-box is not clearly visible in the video.
starting at 0:12 I kept the backspace key pressed, and it took ~15s to delete the few characters.

This was on a Core-i5 540M Laptop (2.53ghz base, 3.06 ghz turbo) running Linux.
Keywords: perf
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Firefox: 56.0a1, Build ID: 20170629030206

I have tested this issue on latest Nightly (56.0a1) build on Ubuntu 14.04 and on Windows 7 x64 and  Mac Os 10.11. I have managed to reproduce it. If you have a large conversation on web whatsapp and start typing fast, Firefox become sluggish and the characters are displayed with a delay. On Windows 7 and Ubuntu 14.04 the CPU usage increase until ~25% (AMD FX - 8320 Eight-Core Processor) and on Mac Os the CPU usage increase until ~85% (a 3.06 GHz Intel Core 2 Duo).

It seems that this behavior is also reproducible on Firefox 53.0, 54.0 and Beta 55. I have tested this in Chrome and the issue is not reproducible. 

I have used the Gecko Profiler add-on to measure the performance. Here are the results:
- Windows: http://bit.ly/2u6z6L1
- Linux: http://bit.ly/2t7ZN25
- Mac Os: http://bit.ly/2twXCIl

Mike, can you please help me out again with the provided profiles?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mconley)
OS: Unspecified → All
Hardware: Unspecified → x86_64
I'm seeing synchronous layout flush on input events. I suspect this gets worse proportionally to the size of the conversation.

Hey dholbert, is there anything actionable here?
Flags: needinfo?(mconley) → needinfo?(dholbert)
Summary: WhatsApp Web unuseable slow for longer conversations → WhatsApp Web unuseable slow for longer conversations due to sync layout flush on input events
Whiteboard: [qf]
This seems likely similar to bug 1373023 -- I wonder if this got a little better after we removed some sync reflow flushes over there?

In any case, what remains is likely bug 1377253, i.e. we could stand to cache more data between flex container reflows, to make incremental reflow cheaper.
Depends on: 1377253
Flags: needinfo?(dholbert)
Whiteboard: [qf] → [qf:p3]
Component: Untriaged → Layout
Product: Firefox → Core

Comment 5

a year ago
There is also an unexplained spike in VRAM usage occuring when whatsapp web is first drawn and updated as the user interacts with it.

Comment 6

11 months ago
This not only happens with longer text input, opening images or accessing the paperclip menu can be a crawl too (not always though). If Chrome feels like 60 fps, Firefox feels more like 20 fps with dips to lower numbers on the same hardware. 
Other menus, like the hamburger or right click menu behave much better however. 

This hasn't gotten much better over the recent performance improvements efforts and is a big dent in the awesome experience Nightly has become.
(Reporter)

Comment 7

11 months ago
the issue is till present in Nightly 57 with Stylo/Servo enabled

Updated

11 months ago
Depends on: 1364813

Updated

11 months ago
See Also: → bug 1396502
Duplicate of this bug: 1395644

Updated

10 months ago
Priority: -- → P3
(Reporter)

Comment 9

10 months ago
Is this really only P3 "normal"? - in fact one of the most popular web-application is almost unuseable.
Whatsapp-Web not working properly was one of the main reasons for me to switch to Chrome.
Don't read too much into the "3" value of P3 there - right now we just loosely use that field, to distinguish bugs that haven't yet been seen/triaged [the field is unset] vs. bugs that have been seen/triaged [the field is set, usually to P3].

In any case: this bug here is indeed a serious issue, and the fix won't be trivial, but I have a rough plan and it'll likely happen over in bug 1377253 and helper bugs.
See Also: → bug 1398697

Updated

9 months ago
status-firefox57: --- → wontfix
(Reporter)

Comment 11

7 months ago
for more than 6 months it is now known, that WhatsApp-Web - the web interface for the world'd most popular message service isn't working properly with Firefox.

Comment 12

7 months ago
Also WebRender doesn't seem to improve performance one bit - on the contrary. So there seems to be no improvement in sight. 

According to my experience there are also more problems with performance than what will be handled by bug 1377253.
(In reply to TMart from comment #12)
> Also WebRender doesn't seem to improve performance one bit - on the
> contrary. So there seems to be no improvement in sight. 
> 

WebRender is not designed to help with layout performance, and we've identified the problem here as a layout issue.(In reply to 

> According to my experience there are also more problems with performance
> than what will be handled by bug 1377253.

I'm curious how you're determining that - have you found performance problems with WhatsApp that are not layout-bound?
Flags: needinfo?(Tobias.Marty)
You need to log in before you can comment on or make changes to this bug.