NEW 222723
Canvas Memory Leak
https://bugs.webkit.org/show_bug.cgi?id=222723
Summary Canvas Memory Leak
Roman Nikitin
Reported 2021-03-04 01:44:56 PST
Created attachment 422201 [details] memory usage screenshot In Canvas with big count of elements memory reaches limit. It can be about 2GB. Unfortunately, I can't profile it, because dev tools fails. But in Chromium same canvas takes about 200mb. I found old tickets about the same problem, but they are not solved. This problem is critical for our product.
Attachments
memory usage screenshot (131.30 KB, image/png)
2021-03-04 01:44 PST, Roman Nikitin
no flags
Profile file (4.07 MB, application/json)
2021-03-08 22:37 PST, Roman Nikitin
no flags
Chrome profile (9.75 MB, application/json)
2021-03-11 03:36 PST, Roman Nikitin
no flags
Safari profile (4.13 MB, application/json)
2021-03-11 03:37 PST, Roman Nikitin
no flags
Alexey Proskuryakov
Comment 2 2021-03-05 13:35:05 PST
Could you please provide a test that reproduces this issue?
Roman Nikitin
Comment 3 2021-03-08 22:37:39 PST
Created attachment 422665 [details] Profile file
Roman Nikitin
Comment 4 2021-03-08 22:38:19 PST
I've added profile file. Did you mean it?
Simon Fraser (smfr)
Comment 5 2021-03-09 10:05:47 PST
We need a link to a web page which we can load ourselves to investigate the issue.
Roman Nikitin
Comment 6 2021-03-11 00:05:10 PST
We are preparing example with not sensitive information, wait please
Radar WebKit Bug Importer
Comment 7 2021-03-11 01:45:22 PST
Roman Nikitin
Comment 8 2021-03-11 03:35:44 PST
I've prepared link where leak happens https://miro.com/app/board/o9J_lQfOEOc=/ My actions: - I see all "frames" in board - I try to zoom to one "frame" In safari memory it takes about 2gb memory - limit was reached In chrome memory it takes 200mb in peak I've added new profile files
Roman Nikitin
Comment 9 2021-03-11 03:36:22 PST
Created attachment 422919 [details] Chrome profile
Roman Nikitin
Comment 10 2021-03-11 03:37:14 PST
Created attachment 422920 [details] Safari profile
Roman Nikitin
Comment 11 2021-03-15 22:42:44 PDT
Do you have any updates?
Simon Fraser (smfr)
Comment 12 2021-03-16 11:44:22 PDT
What version of Safari are you testing, and on what OS version?
Roman Nikitin
Comment 13 2021-03-16 12:02:16 PDT
I have MacOS 11.2.2 and Safari 14.0.3
Said Abou-Hallawa
Comment 14 2021-03-16 12:50:28 PDT
When doing little editing in https://miro.com/app/board/o9J_lQfOEOc=/, Safari can reach 1GB on my machine. Chrome uses three processes when opening this page (Google Chrome, Google Chrome Helper "Renderer" and Google Chrome Helper "GPU"). The total memory of these processes is about 880MB. So Safari takes 16% more than Chrome. But regardless of this, 1GB memory is a huge amount of memory to be taken by one page.
Roman Nikitin
Comment 15 2021-03-17 00:51:40 PDT
If I understand correctly, Chrome can parallel some processes and because it works faster them Safari? And now webkit doesn't have problems with memory and garbage collection. Could you confirm it?
Said Abou-Hallawa
Comment 16 2021-03-19 13:00:25 PDT
The page https://miro.com/app/board/o9J_lQfOEOc=/ has three full screen canvases. On my iMacPro, each takes 5120 x 2776 pixels. The size of each backing IOSurface is 56,852,480 bytes. This is almost 57MB.
Roman Nikitin
Comment 17 2021-03-19 13:25:39 PDT
Okay, thanks. I will try to find more information about memory using. If I find something, can I write here?
Note You need to log in before you can comment on or make changes to this bug.