Closed Bug 1599811 Opened 5 years ago Closed 4 years ago

Lag/freezing when switching tabs

Categories

(Firefox :: Messaging System, defect, P1)

71 Branch
Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
Firefox 71
Performance Impact high
Tracking Status
firefox71 + fixed

People

(Reporter: yoasif, Assigned: andreio)

References

Details

(Keywords: perf:responsiveness)

Attachments

(1 file)

Basic information

As reported on reddit: https://www.reddit.com/r/firefox/comments/e2hqdi/firefox_has_drastically_slowed_down/

Steps to Reproduce:

I was attempting to switch from one tab to another and it froze for several seconds.

Expected Results:

No freezing.

Actual Results:

Freezing when switching tabs.


More information

Screenshot: (if relevant, please attach a screenshot or screencast to this bug report)

Profile URL: https://perfht.ml/2KYMGdo

Basic systems configuration:

OS version: Windows 10

GPU model: NVIDIA GeForce GTX 1070

Number of cores: 4

Amount of memory (RAM): 16GB

Thanks so much for your help.

Attached file about:support
See Also: → 1595830

The parent process is busy iterating over lots of "messages" in ASRouter.jsm. There's also some time spent in mozjexl.

This sounds similar to bug 1594405.

Component: Performance → Messaging System
Flags: needinfo?(andrei.br92)
Product: Core → Firefox
Whiteboard: [qf]

Yes that seems very likely. And the mozjexl evaluation calls are caused by bug 1594129. Unfortunately these were fixed for 72 not 71.
I'll keep digging at the profile see if I can spot anything else.

Flags: needinfo?(andrei.br92)

I've asked the original reporter on Reddit to re-test with Firefox Nightly.

Andrei, are the large amounts of "messages" expected? Did the user do anything special to get into this case, and is there something they could do to work around this problem?

Flags: needinfo?(andrei.br92)

I've currently flagged the two bugs mentioned in my previous comment for uplift into 71. Together they should do a lot to improve the situation.
Some more context: I think the issue is caused by the snippet messages meant for the new tab page. The number of messages is quite high and we previously (before these 2 fixes) evaluated them too often and without caching the result. I didn't know the issue affected 71 as well.
I would suggest disabling snippets from about:preferences#home if the issue re-appears but maybe we should keep this as a backup in case the patches don't get uplifted. I wouldn't want "turning off features" to be a solution we offer.

Flags: needinfo?(andrei.br92)
Assignee: nobody → andrei.br92
Priority: -- → P1
Whiteboard: [qf] → [qf:p1:responsiveness]
See Also: → 1603198

We have uplifted bug 1594405 and bug 1594129 in the 71 beta cycle. I am going to mark 71 as fixed as these perf fixes are what we could act on in this cycle, other perf improvements should target our upcoming 72 and 73 releases.

With the messages removed in bug 1603483 this should no longer be a problem.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Performance Impact: --- → P1
Whiteboard: [qf:p1:responsiveness]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: