Canvas rendering low performance after few seconds
Reported by
troy...@gmail.com,
May 18 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Steps to reproduce the problem: 1. see the problem at stackoverflow http://stackoverflow.com/questions/44042183/canvas-performance-when-drawing-massive-amount-of-images 2. use the html file in attachment to reproduce What is the expected behavior? it should works fine in 60 FPS What went wrong? After running few seconds, FPS became very low and I don't know why. This Page works fine in IE 11 and FireFox and Microsoft Edge Did this work before? N/A Chrome version: 58.0.3029.110 Channel: stable OS Version: 10.0 Flash Version:
,
May 19 2017
Was this the image bug that was fixed by modifying the cache?
,
May 19 2017
@schenney Sorry, I don't quite understand what you mean, could you please explain in more detail?
,
May 23 2017
Sorry, I was not directing that question to troysdc@. Not too long ago junov@ landed a patch to change the cache size for images. I was wondering if that was the same issue as the one reported here.
,
May 23 2017
@#2: This is a separate bug. The problem here is that the rendering loop is leaking canvas objects, and the browser is exceeding canvas GPU resource limits before garbage collection is triggered. Therefore, at some point, canvases stop being GPU accelerated.
,
May 24 2017
@junov Thanks, now I know the reason. But how Can I fix it? For I am already removed canvas from canvasList and DOM.
,
May 24 2017
There are two way you could fix this: A) avoid creating temporary canvas objects. Instead, create a single canvas that you keep re-using until the end of time. or B) Set the size (width or height attribute) to 0 when you are done using the canvas. That will release GPU resources immediately instead of waiting for the object to be garbage collected.
,
May 25 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 28 2018
,
Aug 23
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by kavvaru@chromium.org
, May 18 2017