Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 81e8132467edb862211ddfca4dc298b49ed58bae
      
https://github.com/WebKit/WebKit/commit/81e8132467edb862211ddfca4dc298b49ed58bae
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M Source/WebKit/Shared/cf/CoreIPCCGColorSpace.mm

  Log Message:
  -----------
  Cache the ICC data serialization of recently seen CGColorSpaces
https://bugs.webkit.org/show_bug.cgi?id=325541
rdar://188627165

Reviewed by Kimmo Kinnunen.

Color spaces that have no WebCore equivalent and no name are serialized for IPC 
as their ICC
profile. Doing that calls CGColorSpaceCopyPropertyList() and copies the whole 
profile into a Vector,
and it happens again every time the same color space is sent.

Keep the ICC data for the last two such color spaces in a small 
most-recently-used cache. Entries
are matched by CGColorSpaceRef identity. Each entry retains its color space, so 
a cached pointer
can't be freed and handed out again as a different color space.

~0.5% SP3 improvement.

* Source/WebKit/Shared/cf/CoreIPCCGColorSpace.mm:
(WebKit::computeSerializableColorSpace):
(WebKit::WTF_REQUIRES_LOCK):
(WebKit::CoreIPCCGColorSpace::serializableColorSpace):

Canonical link: https://commits.webkit.org/322132@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to