[Webkit-unassigned] [Bug 195325] Canvas elements not garbage collected immediately in Safari on iOS 12

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 22 11:40:50 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=195325

--- Comment #18 from Dean Jackson <dino at apple.com> ---
Hi Peter,

> > A. Do nothing - this is expected behaviour [1]. The workaround of setting the canvas size to 0 is probably the best solution.
> > Option A is definitely frustrating for developers. I sympathise :disappointed:

> None of the other browsers have problem with this, so I’m not sure this is
> expected behavior. 

As far as I can tell, it's because they have chosen option B by default. i.e. they'll let you create canvas objects until everything blows up.

That might be the best thing to do in this situation. I'm not sure.

> The problem is that not only the canvases no longer
> referenced anywhere on the page aren’t properly collected (and you could do
> the workaround here), but mainly, that when you refresh a page the memory
> still keeps being allocated somewhere. 

Interesting! That would be a different bug - so I'll try to reproduce it.

Garbage Collection does not necessarily run during a reload though, so you might be seeing the same issue just in a slightly different way.

> Resetting canvas size is also frustrating to users, because when you’re
> leaving a page, resetting the canvas size creates a delay and content shift
> before user is navigated to next page.

OK. This likely is GC not running yet.

Maybe removing the canvas limit is a good idea, because the system memory pressure would force GC.

> Happy to hop on a call or provide more minimal reproducible examples if
> needed.

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220622/81e26bff/attachment.htm>


More information about the webkit-unassigned mailing list