Closed Bug 1493440 Opened 6 years ago Closed 6 years ago

slow tab switching when computer is under CPU and GPU load (from other apps) with non-Webrender

Categories

(Core :: Graphics, defect)

x86_64
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Performance Impact none

People

(Reporter: asa, Unassigned)

References

Details

When my PC is under load, about 10-15% CPU and 30-40% GPU, from running a game on my system, Firefox tab switching can sometimes hang or be very slow. 

Tested on a Windows 10 (64-bit) Surface Book 2 with a Core i7 8650U CPU at 1.9GHz, 16 GB RAM, and an Nvidia GeForce GTX1050. I have enabled WebRender. Tested on several recent Nightly builds. 

This profile captures a particularly bad tab switching hang https://perfht.ml/2OLZd49

Steps to reproduce: 
1. Load up another program that uses 10-15% CPU and 30-40% GPU
2. Load and open a few tabs on Firefox Nightly with WebRender enabled.
3. Switch between tabs. 

Results: sometimes a bad hang on tab switching.

Expected results: no hanging. 

Other: from rjesup on slack "I see 1-second or longer rasterizations, including https://perfht.ml/2xuM60C - ~650ms in D2DDevice::CreateDeviceContextHelper and ~250ms in mozilla::gfx::DrawTargetD2D1::ClearRect and mozilla::layers::D3D11TextureData::Create.  Much of those may be blocked by the GPU process, which spends much of this time in LayerManagerMLGPU::RenderLayers (~500ms) and mozilla::layers::MLGSwapChainD3D11::Present (~300ms) at these same times..  NOTE: the running time and self times reported are incorrect - this profile seems be every 2ms, and it's assuming 1ms per sample.  So generally double the numbers shown."

"here (https://perfht.ml/2xE1wQf) we spend almost all of 2.7 seconds doing GPU stuff - almost the whole time in the content process inside mozilla::layers::D3D11TextureData::Create (ending in NtGdiDdDDICreateAllocation); the GPU process is busy at the same time doing two long composite operations.

wonders if there's a bitcoin miner monopolizing Asa's GPU ;-)"
The profile shows that WebRender was not used. Can you capture a new profile with WebRender enabled?
Oh and please add ",Renderer" to the threads text box in the profiler settings when profiling WebRender.
Oops. You are correct. I had disabled WebRender. I've re-enabled it and added Renderer to the threads in the profiler. Will update with a new profile when I catch the next hang/slowdown.
I've tried and failed to reproduce a tab hang/slowness with WebRender enabled and I cannot. Win for WebRender! Should I close this bug or do we want to try to do something for the users who don't have/won't get WebRender?
It's going to be a while before all users have webrender

FYI, note from slack: asa was running a game (presumably 3D - it was from blizzard) at the time this happens
Whiteboard: [qf] → [qf-]
Let's close this bug. I don't think there is anything actionable for non-WR here. WR is designed to make better use of the GPU, and (assuming there's no canvas or WebGL) it moves all the GPU access into the GPU process instead of having some of it in the GPU process and some of it in the content processes.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Summary: slow tab switching when computer is under CPU and GPU load (from other apps) → slow tab switching when computer is under CPU and GPU load (from other apps) with non-Webrender
Performance Impact: --- → -
Whiteboard: [qf-]
You need to log in before you can comment on or make changes to this bug.