Nightly is spinning when switching tabs with Mac under high load
Categories
(Core :: XPCOM, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr102 | --- | unaffected |
| firefox113 | --- | unaffected |
| firefox114 | --- | unaffected |
| firefox115 | --- | fixed |
People
(Reporter: standard8, Assigned: KrisWright)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
A few times today, I've had this issue. Not sure if it is only on the latest nightly, but I haven't seen it for a while.
I'm on a 2021 M1 Max MacBook Pro.
STR
- Start a full build of Firefox or Thunderbird from mozilla-central.
- During the intense parts (dom/ ?), try switching tabs in Firefox.
Expected Results
Tab switch to happen straight away.
Actual Results
The tab hangs, potentially for a long time, until the load lightens. If the build is stopped, it generally clears straight away.
Here is a profile exhibiting the behaviour:
https://share.firefox.dev/3O5jt27
The first place where the spinner cleared, it cleared itself I think the load was slightly lessened.
The last place I manually killed the separate build.
| Reporter | ||
Comment 1•3 years ago
|
||
Running mozregression gives me:
which is bug 1832365.
Toggling the threads.lower_mainthread_priority_in_background.enabled preference off also fixes it for me.
Whilst testing under high loads, I noticed a couple more things:
- I once had the "<tab> is causing your browser to be slow, would you like to stop it" notification pop up.
- Shutting down Firefox was also slow.
Comment 2•3 years ago
|
||
Set release status flags based on info from the regressing bug 1832365
| Assignee | ||
Comment 3•3 years ago
|
||
This is the sort of performance regression expected (but not desired) from this change. I am able to reproduce this on my machine by writing a quick program that forces all cores to spin. I think we can fix this by getting a boilerplate CPU utilization metric from the system and avoiding exercising the new codepaths in the event of high utilization. I'll see if I can get a fix up shortly.
| Assignee | ||
Comment 4•3 years ago
|
||
To add some notes from some discussion about the issue: QOS class cannot be set off of the owning thread; while we can set the thread attributes for startup, we cannot realistically set the actual QoS class offthread. Therefore we cannot realistically use cpu utilization as a metric to "warm up" the main thread, because the deprioritized main thread cannot be woken up by anything but itself. Instead we will experiment with adjusting the priority we are using.
| Assignee | ||
Comment 5•3 years ago
|
||
Utility level is often used for nonperceivable work, but operates at a higher level than a background priority. This puts our background main thread priorities on the same level as the OS uses for general offthread work, so the perceivable delay to warm up the main thread on high cpu usage is limited to a few seconds (previously indefinite).
Updated•3 years ago
|
Comment 7•3 years ago
|
||
| bugherder | ||
Description
•