Issue metadata
Sign in to add a comment
|
Chrome memory usage increases to 50GB with canvas manipulations
Reported by
nathand...@gmail.com,
Oct 3 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36 Steps to reproduce the problem: 1. Go to plunker (https://plnkr.co/kcJnvP) 2. Increase number of images to manipulate to 2000 and set delay to 20ms 3. Run the experiment (This app loads images repeatedly into a canvas, rotates it, and saves the dataURL) 4. You'll see the memory usage increase in Activity Monitor (see screenshot) and the Chrome Task Manager. It decreases slightly every once in a while but when the operation completes, the memory is never freed. What is the expected behavior? I would expect the memory usage to stay below 5 GB and for the canvases to take longer to render. As soon as the operation is complete I would expect most of the memory to be freed. What went wrong? The memory usage kept climbing in Mac Activity Monitor (I saw it increase to over 50GB) and in the Task Manager (Peaked at around 9 GB). When the operation completed, the memory did not drop back down to normal. Did this work before? N/A Chrome version: 53.0.2785.116 Channel: n/a OS Version: OS X 10.11.6 Flash Version: Shockwave Flash 23.0 r0 This may have some relation to https://bugs.chromium.org/p/chromium/issues/detail?id=242215
,
Oct 5 2016
I believe this is not a canvas bug, we already have a bug for chrome helper.
,
Oct 5 2016
sorry, I should take a closer look before duplicating this.
,
Oct 6 2016
Hi, I think I know what the problem is. I looked at the script, and I found that it does "canvas.toDataURL()" in a for loop. canvas.toDataURL() internally does creating a new ImageData(). So this is exactly the same as: https://bugs.chromium.org/p/chromium/issues/detail?id=626082 I believe people are actively working on the above issue. The problem should be less obvious if you use chrome canary: https://www.google.com/chrome/browser/canary.html |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by thestig@chromium.org
, Oct 5 2016