Closed Bug 2036365 Opened 21 days ago Closed 18 days ago

Slow composites when using DComp. Time spent in NtFlipObjectAddPoolBuffer and ZwFlipObjectRemoveContent

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox150 --- fixed
firefox151 --- fixed
firefox152 --- fixed

People

(Reporter: jrmuizel, Assigned: sotaro)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

From https://www.reddit.com/r/firefox/comments/1t049ar/jerky_stuttery_scrolling/

Browser runs better when profiling with screenshots which disables DirectComposition.

Happens on Nvidia

Here's an excerpt of the profile: https://share.firefox.dev/4tKqxmy

DirectComposition::CDevice::CreateCompositionTexture is waiting on NtFlipObjectAddPoolBuffer
and releasing it gets stuck on ZwFlipObjectRemoveContent

Any guesses Sotaro?

Flags: needinfo?(sotaro.ikeda.g)

It's particularly bad on websites with embedded video. LinkedIn is really bad when there's a video on the page, but smooth otherwise with pictures and text. Here's an example, this blog has video in the page, and scrolling through that is slow and jerky. Smooth once the video is off the screen.

https://blog.mozilla.org/performance/2024/12/12/introducing-the-chrome-extension-for-the-firefox-profiler/

Current DCLayerTree has a mechanism to detect slow present with video overlay. But it seemed not work in this case.

It seems better to disable WebGL overlay if RenderDXGITextureHost::GetDCompositionTexture() becomes slow.

And going to look into if I could reproduce the problem.

Assignee: nobody → sotaro.ikeda.g

(In reply to Jeff Muizelaar [:jrmuizel] from comment #0)

From https://www.reddit.com/r/firefox/comments/1t049ar/jerky_stuttery_scrolling/

Browser runs better when profiling with screenshots which disables DirectComposition.

With layer compositor, DirectComposition is not disabled during taking profile with screenshot. It just disables overlays.

I could reproduce the problem with the following with NVIDIA GPU. I am going to look into it.

https://webglsamples.org/aquarium/aquarium.html

Flags: needinfo?(sotaro.ikeda.g)

With WebGL, gl::SharedSurface is recycled in WebGLContext::PushRemoteTexture(). But TextureHost is not recycled. The TextureHost is always created in RemoteTextureOwnerClient::PushTexture(). Then RenderDXGITextureHost is always created for rendering update. Then IDCompositionTexture was always created in RenderDXGITextureHost::GetDCompositionTexture() for each update.

Keywords: regression
Regressed by: 2008399

Set release status flags based on info from the regressing bug 2008399

See Also: → 2036655

Disable WebGL/WebGPU overlay until Bug 2036655 is addressed.

Regressed by: 2013143

Disable overlay of WebGL/WebGPU until Bug 2036655 is addressed.

Attachment #9582752 - Attachment is obsolete: true

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Bad performance regression on WebGL on some platforms
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: This just reverts the change from bug 2013143
  • String changes made/needed?: No
  • Is Android affected?: no
Attachment #9582820 - Flags: approval-mozilla-beta?

Disable WebGL/WebGPU overlay until Bug 2036655 is addressed.

Original Revision: https://phabricator.services.mozilla.com/D298160

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: Bad performance regression on WebGL on some platforms
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: This just reverts the change from bug 2013143
  • String changes made/needed?: No
  • Is Android affected?: no
Attachment #9582821 - Flags: approval-mozilla-release?

Disable WebGL/WebGPU overlay until Bug 2036655 is addressed.

Original Revision: https://phabricator.services.mozilla.com/D298160

Status: NEW → RESOLVED
Closed: 18 days ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Attachment #9582820 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9582821 - Flags: approval-mozilla-release? → approval-mozilla-release+
QA Whiteboard: [qa-triage-done-c152/b151]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: