Closed Bug 1838900 Opened 1 year ago Closed 1 year ago

Increase the size of the canvas ring buffer.

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [sp3])

Attachments

(1 file)

When drawing complicated content to canvas the ring buffer will fill up
faster than we can consume which causes us to block on the main thread.

This shows up noticeably on the chartjs SP3 test.

Other browsers don't suffer from this problem:

Safari uses 2MB buffer:
https://searchfox.org/wubkat/rev/a420a9f3f6ab4c8d0c75aae3877d736d66affe36/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp

Chrome records into a resizable vector.

In local testing a size of 512Kb was insufficient to avoid blocking but
1Mb was enough. I'm setting it to 512Kb for now in the hope that we can
reduce the recording size and make the replay fast enough that 512Kb wil
be enough.

When drawing complicated content to canvas the ring buffer will fill up
faster than we can consume which causes us to block on the main thread.

This shows up noticeably on the chartjs SP3 test.

Other browsers don't suffer from this problem:

Safari uses 2MB buffer:
https://searchfox.org/wubkat/rev/a420a9f3f6ab4c8d0c75aae3877d736d66affe36/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp

Chrome records into a resizable vector.

In local testing a size of 512Kb was insufficient to avoid blocking but
1Mb was enough. I'm setting it to 512Kb for now in the hope that we can
reduce the recording size and make the replay fast enough that 512Kb wil
be enough.

Pushed by jmuizelaar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6b77fbf8665 Increase the size of the canvas ring buffer. r=bobowen
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Blocks: 1812362
Blocks: speedometer3
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: