Open Bug 1690654 Opened 5 years ago Updated 1 year ago

Detect no-op renders during frame building and avoid the render, to reduce power usage

Categories

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

enhancement

Tracking

()

Performance Impact low

People

(Reporter: mstange, Unassigned, NeedInfo)

References

(Blocks 3 open bugs)

Details

(Keywords: perf:resource-use, power)

Testcase: attachment 9193979 [details]
Profile: https://share.firefox.dev/2YNK60l

This testcase has a border-left-width CSS animation on an element that is not on the screen. During frame building, we end up with no work to be done.
However, we still trigger a render on the Renderer thread, with 0 draw calls.

We should avoid that render, to reduce power usage. We should be able to detect it during frame building.

Type: defect → task
Summary: Too much CPU usage for out-of-view animations doing no-op renders → Detect no-op renders during frame building and avoid the render, to reduce power usage
Severity: -- → S3

Agreed, this is an exhancement/optimization not a bug per se. Admittedly a low-hanging enhancement, but prioritizing as such.

Type: task → enhancement
Priority: -- → P3
Whiteboard: [qf] → [qf:p3:resource]
Performance Impact: --- → P3
Whiteboard: [qf:p3:resource]

Here is a more recent profile of the testcase: https://share.firefox.dev/3xiFRwt

Here is a profile with the power profiling feature: https://share.firefox.dev/3MYiWOl It looks like significantly more power is used in the parent process than in the content process.

(In reply to Markus Stange [:mstange] from comment #0)

We should avoid that render, to reduce power usage. We should be able to detect it during frame building.

Markus, can you say a bit more about where you think this optimization could be implemented? Would it be a check around https://searchfox.org/mozilla-central/rev/0c2945ad4769e2d4428c72e6ddd78d60eb920394/gfx/layers/wr/WebRenderLayerManager.cpp#466 right before we send the IPC to the parent? Or even before?

Flags: needinfo?(mstange.moz)

Sotaro, can you give pointers on how this would be implemented?

Flags: needinfo?(mstange.moz) → needinfo?(sotaro.ikeda.g)
You need to log in before you can comment on or make changes to this bug.