A Js/Canvas demo spends 15+ seconds in cc
Categories
(Core :: Cycle Collector, enhancement)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
()
Details
Optional prerequisite: Enable the gpu-canvas feature to eliminate Canvas as the major source of slowness while animating the demo.
Go to https://www.fxhash.xyz/generative/slug/boundless-realm-of-possibilities
Click on "Open". The demo will run. Enjoy it.
Press the "a" button on your keyboard. The demo will animate
ER The animation will take a long time to complete (specially the black boxes on the bottom row of the image will take a long time to get colored.)
Profile suggests long time in cc/gc : https://share.firefox.dev/3Y370y9
Reporter | ||
Comment 1•2 years ago
•
|
||
Optional profile with d2d-canvas: https://share.firefox.dev/3wFjf7S
Reporter | ||
Comment 2•2 years ago
|
||
Chrome also appears to continuously use CPU here.. Which seems to suggest that the demo is doing something weird.
Comment 3•2 years ago
|
||
Something about this demo is causing Firefox to leak contexts used to paint on HTML canvases. Or at least to churn through them faster than the cycle collector can recover them. According to the profile it's spending 18% of its time in HTMLElementCanvas::getContext
and another 18% in HTMLElementCanvas::Release()
during CC.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Similar to bug 1811188 where someone is basically writing bad code - creating tons of ImageData objects, among other things.
Reporter | ||
Comment 5•2 years ago
|
||
Profile with latest Nightly: https://share.firefox.dev/3RoOQEh
Reporter | ||
Comment 6•7 months ago
•
|
||
The behaviour has now changed.
Previously, memory would rise slowly and around the 1GB mark, the long CC would start. I dont recall if the memory would increase after the CC completed.
Now, the memory rises continuously and rapidly (50mb/s). Profile: https://share.firefox.dev/3Wt4ClH
Bisection:
Bug 1857618 - Ensure normal tasks get enough time to run, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D193409
Description
•