Closed Bug 1690653 Opened 3 years ago Closed 3 years ago

No-op composites spend too much time in CoreAnimation

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect

Tracking

()

RESOLVED FIXED
87 Branch
Performance Impact ?
Tracking Status
firefox87 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 2 open bugs)

Details

(Keywords: power)

Attachments

(1 file)

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

On this testcase, every render has NumDrawCalls: 0. However, we still spend an appreciate amount of CPU time in CoreAnimation-related code. We should check if there's a way to avoid this overhead if we detect that no changes ended up happening.

For example, we always assign to the CALayer sublayers property, even if the set of sublayers hasn't changed. This might make a difference. (edit: we don't actually do this)

Blocks: power-usage
Keywords: power
Whiteboard: [qf]

This avoids some overhead from committing the transaction.

Before: https://share.firefox.dev/2YR1fWZ
14% of render time spent in NativeLayerRootCA::CommitToScreen

After: https://share.firefox.dev/39PWXW8
0% of render time spent in NativeLayerRootCA::CommitToScreen

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/269cdb8ab3de
Don't create a CATransaction if nothing changed. r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Performance Impact: --- → ?
Whiteboard: [qf]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: