[Webkit-unassigned] [Bug 31253] Unbounded memory growth when adding and removing images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 19 00:47:17 PDT 2018


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

Pierre Fritsch <pierre.fritsch.work at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pierre.fritsch.work at googlem
                   |                            |ail.com

--- Comment #14 from Pierre Fritsch <pierre.fritsch.work at googlemail.com> ---
For others battling with the memory increase in Safari when changing an image src, there's a work around until this bug is fixed: 

Store the image binary data in a `Blob` object, `createObjectURL` to represent this blob, and assign this URL as the `Image.src`. Finally, `revokeObjectURL` before switching to the next image.

See also https://stackoverflow.com/a/38624675/4769344

Note that this method assumes the usage of Data URIs. If you need to read existing image files, you would have to load the images on some server and to pass them to the browser as data URIs in order to avoid the creation of `Image` objects in WebKit.

-- 
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/20180719/19b7f475/attachment.html>


More information about the webkit-unassigned mailing list