Open Bug 1681747 Opened 5 years ago Updated 3 years ago

sw-wr performance bad when viewing pdfs on macOS

Categories

(Core :: Graphics: WebRender, defect)

Unspecified
macOS
defect

Tracking

()

REOPENED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: jrmuizel, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

https://share.firefox.dev/2W2r3yc

We're spending lots of time in composite_TEXTURE_RECT_frag::run which isn't fast-pathed.

Blocks: sw-wr-perf
Flags: needinfo?(jmuizelaar)
Severity: -- → S4
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5f82b68a19d5 add SWGL fast-path for composite shader. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch

== Change summary for alert #28087 (as of Tue, 15 Dec 2020 12:29:47 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
18% glterrain macosx1014-64-shippable-qr e10s stylo webrender-sw 10.64 -> 8.70
18% glterrain macosx1014-64-shippable-qr e10s stylo webrender-sw 10.70 -> 8.75

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28087

This helped but performance is still not amazing: https://share.firefox.dev/2Kx4aQM

Flags: needinfo?(jmuizelaar)

We should investigate why on macOS we're going to the composite shader in this case instead of actually going through the native compositor to composite this directly.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
OS: Unspecified → macOS
Assignee: lsalzman → matt.woodrow

The "WR OS compositor" markers on the Renderer thread in Jeff's profiles show that the native compositor clearly is used. So maybe we use the composite shader to composite external images like canvases into picture tiles?

Flags: needinfo?(gwatson)

If an external image doesn't get attached as a native surface, it will fall back to using the composite shader to construct a native surface from whatever the external data source is. However, it's not clear to me why this would be happening on mac from a quick look at the code.

I'm currently looking into fixing https://bugzilla.mozilla.org/show_bug.cgi?id=1679480, and I think a good first step for that may be to refactor the Draw compositor to be implemented in terms of the normal compositor trait (this will greatly simplify the picture cache code for managing surfaces, which should make it much simpler to fix the referenced bug). When I get to that, it may become apparent why we're hitting the composite shader in this case, if no one else gets to investigate it first.

Flags: needinfo?(gwatson)

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: matt.woodrow → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: