Open Bug 972392 Opened 11 years ago Updated 1 year ago

Canvas 2D has high power consumption on Linux

Categories

(Core :: Graphics: Canvas2D, defect)

x86
All
defect

Tracking

()

People

(Reporter: rvitillo, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: power, Whiteboard: [Power:P3])

Attachments

(1 file)

When running the test case with FF, the X server process is constantly around 70% in top while with chrome it never goes above 5%.

Also note that on OSX the power consumption of Chrome is much higher but while on Chrome the animation is smooth the same cannot be said for FF, at least not on my machine.
bjacob, what prefs should we re-run this test with?
Flags: needinfo?(bjacob)
Very interesting work, I would suggest that you check if setting these preferences makes a difference:

layers.acceleration.force-enabled = true  (boolean)
gfx.canvas.azure.backends = skia          (string)
gfx.canvas.azure.accelerated = true       (boolean, you might have to create it)
Flags: needinfo?(bjacob)
If it's easy to run the test I'd suggest running:
(1), (2), (1+2), (1+2+3)

where:

(1) layers.acceleration.force-enabled = true  (boolean)
(2) gfx.canvas.azure.backends = skia          (string)
(3) gfx.canvas.azure.accelerated = true       (boolean, you might have to create it)

You should double check in about:support under Graphics to make sure the preferences were not ignored.
cairo backend - 125J
1) - 127J
2) - 110J
1+2) - 113J
1+2+3) - 120J

It looks like the X server process behaves normally when switching to the skia backend.
Ok this isn't very useful. There's too much happening here so we're going to have to break this down. Right now we have (1) Some heavy Js happening, (2) A lot of canvas painting, (3) A fix overhead for compositing a changed canvas frame.

Here's two test cases to check if the problem lies in (3):
http://people.mozilla.org/~bgirard/Invalidation/canvas/
"canvas-overhead" drives the X sever up to about 15% while with "canvas-overhead-hidden" X never goes over 3%.
Whiteboard: [Power]
Whiteboard: [Power] → [Power:P3]
Severity: normal → S3
Blocks: power-usage
No longer blocks: power
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: