Closed Bug 1680063 Opened 3 years ago Closed 3 years ago

Performance on gen6 win7 is bad

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox84 --- fixed
firefox85 --- fixed

People

(Reporter: jrmuizel, Assigned: mattwoodrow)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

We seem to be spending a lot of time waiting.

Blocks: 1679167
Blocks: gfx-84

Notice the big chunks of time spent in mozilla::wr::RendererOGL::WaitForGPU: https://share.firefox.dev/33vONis

Other applications seem slowed down by the WebRender running Firefox so it could be that the GPU is actually swamped.

I see the problem on 78 (with WebRender forced on) as well, so it's not a recent thing.

The same hardware seems to run just fine on Win10 even with the DirectComposition turned off.

Also seems ok on Win8.1

The Win8.1 driver is 9.17.10.4229

Looking at the gpuview traces I see high DWM times. The problem happens in all of the webrender configurations and none of the non-webrender configurations. Turning the DWM off improves things.

With WebRender off I get "Widget glass margins: left:2 top:84 right:2 bottom:2" with WebRender on I get "Widget glass margins: left:0 top:0 right:0 bottom:0"

I suspect the DWM thinks the entire window is glass.

Assignee: nobody → sotaro.ikeda.g

D98434 is temporal implementation that is borrowed from ContainerState::ComputeOpaqueRect(). It does not handle clip correctly.

I tested it on Win7 PC with about:networking#logging and Widget:5. Glass margin became same between WebRender and CompositorD3D11.

I do not know well about FrameLayerBuilder and display items. :mattwoodrow knows about them and could provide correct implementation.

This patch makes an enormous difference for me.

e.g. DWM gpu times go from 23.5ms down to 6.5ms

Depends on: 1680291

I'll be taking a look at this in bug 1680291.

Assignee: sotaro.ikeda.g → mstange.moz
Status: NEW → ASSIGNED

The attached patch (very similar to Sotaro's one) just identifies the exact display items that are present on win7 and forwards their opaque area to the DL builder.

I think we should take this in the meantime, and uplift it to beta to fix the current win7 performance problems.

We should still work on bug 1680291 for future releases, but I believe the short term fix will be a much lower risk for uplift.

Assignee: mstange.moz → matt.woodrow
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed20bde0b75f
Record opaque background color items as part of the DL builders opaque region when using WebRender. r=mstange

Comment on attachment 9190916 [details]
Bug 1680063 - Record opaque background color items as part of the DL builders opaque region when using WebRender. r?mstange,miko

Beta/Release Uplift Approval Request

  • User impact if declined: Significantly reduced performance on Windows 7 (with Aero Glass). We are currently disabling WebRender on gen6 intel hardware due to this issue (bug 168016), but the performance drop will affect higher power cards too.

If we land this, we can remove the gen6 block instead, and ship WebRender to a lot more users.

  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: Manual testing already completed using try builds
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This just adds an opaque region, which tells the Windows DWM compositor that it doesn't need to do the Glass effects on that subset of the window.

The fix is very targeted for the specific display items that we have on Windows 7. The failure case if these change is that we go back to drawing too much glass.

  • String changes made/needed:
Attachment #9190916 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch

Comment on attachment 9190916 [details]
Bug 1680063 - Record opaque background color items as part of the DL builders opaque region when using WebRender. r?mstange,miko

Approved for 84.0b8.

Attachment #9190916 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9190748 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: