Closed Bug 1697052 Opened 4 years ago Closed 2 years ago

Random lags while typing on web.whatsapp.com

Categories

(Core :: Cycle Collector, defect)

Firefox 86
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: burak.karakan, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

When I am on Whatsapp Web, there is a considerable amount of lag with every few words while typing. I couldn't really figure out how to reproduce the issue, but it happens consistently over the past few versions. I can generally reproduce it by typing quickly or trying to select full words.

Actual results:

There is a lag in message input. Here's the profile I collected: https://share.firefox.dev/3qzGb32

Expected results:

There should have been no lag.

Hi Burak,

I logged in whatsapp on Firefox Nightly 88.0a1 (2021-03-09) and used it for a couple of minutes, sending messages, typing quickly or selecting words. Unfortunately I wasn't able to experience any lag on my end.

Would you be able to test it on Firefox Nightly yourself and give us your feedback?

In the meantime I'll add a product and component to this ticket in the hope the corresponding team can take a look and advice.

Regards,
Virginia

Has Regression Range: --- → no
Has STR: --- → yes
Component: Untriaged → Graphics
Flags: needinfo?(burak.karakan)
Product: Firefox → Core

We're doing a 2 second gc in the content process during the jank.

Component: Graphics → JavaScript: GC

(In reply to Timothy Nikkel (:tnikkel) from comment #2)
The GC activity isn't occurring during the jank in the profile posted above. GC often runs in browser idle time and I don't see any evidence that is not what's happening here.

The page seems to be running content JS during the jank periods.

Component: JavaScript: GC → Performance

The profile posted is very minimal. Burak, if possible could you provide a profile with other threads and JS stacks present? The 'Firefox platform' profiler setting would be a good start but feel free to exclude screenshots.

Did you click "Full view" on top the near the right hand side?

(In reply to Timothy Nikkel (:tnikkel) from comment #5)
🤦 Sorry, it seems I don't know how to use the profiler.

Looking at the full profile shows that the jank periods are when we are running the cycle collector.

Component: Performance → XPCOM

No worries, it was the first time I've ever seen a profile like that. And I apparently can't read G's or C's.

I have been trying to catch a time where it started happening frequently, and just now I noticed that it is happening quite often, so I managed to get a bit longer trace that contains the issue, it happened at least 5 times actually. I have collected the trace with the Firefox Platform profile, and included everything except the screenshots: https://share.firefox.dev/2NfjELa

It doesn't happen only in Whatsapp Web I believe, but this is the most frequent occurrence for me. If I can get it happening on other platforms, I'll try to capture more traces and share them here.

Flags: needinfo?(burak.karakan)

By the way, the sole fact of me being able to collect these detailed stack traces with the simplicity of a simple extension and a single button is the dream actually, thanks to everyone who had played a part in this, and also thanks to everyone looking into these issues.

The cycle collector is spending a lot of time looking at JS objects. A typical cause of this is a memory leak. Could you please attach a memory report by doing "measure and save" in about:memory (with anonymize if you want the report to not include URLs for your open tabs) when you are experiencing the issue? Thanks.

Flags: needinfo?(burak.karakan)
Attached file memory-report.json.gz
Flags: needinfo?(burak.karakan)

I have attached the memory report to the bug here, please let me know if there's further information I can add.

The same behavior seems to happen with other websites as well, currently experiencing this with Confluence. I have attached the memory report here as well. Here's the profiler output: https://share.firefox.dev/3shpnBP

This is the memory report when the same issue was happening on Confluence.

Redirecting this to the cycle collector component now that that eixsts.

Component: XPCOM → Cycle Collector

smaug, given that this WhatsApp is a major app, is there something actionable here?

Severity: -- → S3
Flags: needinfo?(smaug)

A new profile using Nightly would be rather useful.

The older profiles indicate that there has been a leak, either the website itself is leaking, or there is some extension which is causing that or Firefox has had some issue

Flags: needinfo?(smaug) → needinfo?(burak.karakan)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:edgar, since the bug has recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(burak.karakan) → needinfo?(echen)
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(echen)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: