[Webkit-unassigned] [Bug 185757] New: Don't create the SubimageCache just to clear an image from it

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 17 20:54:20 PDT 2018


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

            Bug ID: 185757
           Summary: Don't create the SubimageCache just to clear an image
                    from it
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: simon.fraser at apple.com, thorton at apple.com,
                    webkit-bug-importer at group.apple.com
            Blocks: 185330

When a NativeImageCG object is destroyed, it makes sure there are no references to it left in the subimage cache if the CACHE_SUBIMAGES macro is defined.

However, clearing of the subimage cache actually creates it first (if it doesn't exist yet) just to make sure the image isn't in the cache!.  This isn't very efficient, especially in the UI Process where it is rarely--if ever--used.

Instead, we can return early when clearing the subimage cache if it doesn't exist yet, thus preventing extra work and extra memory allocated for it.

This also makes it possible for us to land a fix for Bug 185330 to check to see if there are other uses of WebCore::Timer in the UI Process.  (The SubimageCacheWithTimer class uses a DeferrableOneShotTimer, which is a subclass of WebCore::TimerBase.)


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=185330
[Bug 185330] [iOS] Add assert to catch improper use of WebCore::Timer in UI Process
-- 
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/20180518/e6daed43/attachment.html>


More information about the webkit-unassigned mailing list