[Webkit-unassigned] [Bug 158139] New: SVGImage should report its memory cost to JS garbage collector

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 26 17:30:10 PDT 2016


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

            Bug ID: 158139
           Summary: SVGImage should report its memory cost to JS garbage
                    collector
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com
                CC: zimmermann at kde.org

If an SVG takes too much memory and it is not referenced by the current document, the garbage collector will not try to free it, unless it has to (like a memory warning from the OS). This can cause the WebProcess to jetsam because it tries to exceed its memory limit.

The SVGImage needs to report an approximation for its memory cost since it is hard and slow process to count all the bytes which are referenced by all the children nodes. This calculation can be very complex if the SVG has animating nodes. If the SVGImage under estimates its memory cost, this will fix the problem partially since the garbage collector will think that the WebProcess is not taking that much memory although it could be near its limit. If the SVGImage over estimates its memory cost, the garbage collector will work more aggressively and it will try more often to free unreferenced memory although there may not be anything to release. This might cause perf and power issues. So we have to be very careful in how much we report.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160527/3a1519e0/attachment-0001.html>


More information about the webkit-unassigned mailing list