Closed Bug 1674396 (sw-wr-perf-clip-box-shadow) Opened 4 years ago Closed 3 years ago

High memory and CPU usage during video playback on Twitch with webrender software fallback

Categories

(Core :: Graphics: WebRender, defect, P3)

Firefox 84
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox84 --- wontfix
firefox90 --- fixed

People

(Reporter: impossibus, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(1 file)

Perhaps this is expected with webrender.software=true? My laptop fans go wild as soon as I start playing a video on Twitch. I do not get the same fan noise when I watch a long YouTube video, say.

I recorded two performance profiles under pretty much the same conditions (fresh profile, the Nightly versions are different but close together). In both cases, the steps during the recording are:

  1. Navigate to Twitch page - video autoplays
  2. Let it play for a while
  3. Navigate to firefox.com

https://profiler.firefox.com/from-addon/calltree/?globalTrackOrder=7-8-9-0-1-2-3-4-5-6&hiddenGlobalTracks=1-2-3-4-5&localTrackOrderByPid=215284-1-2-0~215319-0~215702-0~216635-0~215397-0~215445-0~216532-0-1~&thread=7&v=5

https://profiler.firefox.com/from-addon/calltree/?globalTrackOrder=8-9-10-0-1-2-3-4-5-6-7&hiddenGlobalTracks=1-2-3-4-5-6&localTrackOrderByPid=219252-1-2-0~219282-0~219813-0~219773-0~219491-0~219320-0~219398-0~219683-0-1~&thread=8&v=5

It looks like you didn't publish the profiles. Can you gather some new ones and publish them?

Flags: needinfo?(mjzffr)

D'oh! Sorry.

Now I get "Error publishing" on profiler.firefox.com. Maybe it's too big? I'll try again on Monday.

It looks like those profiles were taken with screenshots turned on. Can you redo them with "Firefox Graphics" preset?

Flags: needinfo?(mjzffr)
Blocks: sw-wr-perf
Severity: -- → S3
Priority: -- → P3

What resolution are you running at?

Flags: needinfo?(mjzffr)

I think 3840 x 2160 but I don't have access to the system in question anymore.

Flags: needinfo?(mjzffr)
Depends on: sw-wr-perf-do-clip

It looks like perhaps the most actionable thing here is the time spent in cs_clip_box_shadow. Most everything else is hitting fast-paths.

Alias: sw-wr-perf-clip-box-shadow
No longer blocks: sw-wr-dogfood
Blocks: 1704342

This adds a span shader that tries to treat the box shadow as a nine-patch
and intersect with the various sectors of it. This allows committing entire
contiguous spans of texture from the source box shadow rather than doing
slower per-fragment processing.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ec2f0492da8a
Implement SWGL fast-path for box shadows. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

== Change summary for alert #30123 (as of Wed, 19 May 2021 03:25:26 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
2% tresize (docs) linux1804-64-shippable-qr e10s stylo webrender-sw 20.62 -> 20.14

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

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: