New issue
Advanced search Search tips

Issue 724008 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 23
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Canvas rendering low performance after few seconds

Reported by troy...@gmail.com, May 18 2017

Issue description

UserAgent: 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:
 
test.html
4.8 KB View Download
Labels: Needs-Triage-M58
Components: -Blink Blink>Canvas
Labels: -Needs-Triage-M58
Was this the image bug that was fixed by modifying the cache?

Comment 3 by troy...@gmail.com, May 19 2017

@schenney
Sorry, I don't quite understand what you mean, could you please explain in more detail?
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.

Comment 5 by junov@chromium.org, May 23 2017

Status: Available (was: Unconfirmed)
@#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.

Comment 6 by troy...@gmail.com, 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.

Comment 7 by junov@chromium.org, 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.
Project Member

Comment 8 by sheriffbot@chromium.org, May 25 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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

Comment 9 by junov@chromium.org, May 28 2018

Status: Available (was: Untriaged)
Status: WontFix (was: Available)

Sign in to add a comment