[webkit-changes] [WebKit/WebKit] f1f25a: Optimize various SVGPropertyOwnerRegistry operations

Chris Dumez noreply at github.com
Thu Sep 28 20:29:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f1f25a76c3445b463f6ff94ab3ec5e97e3bdec3d
      https://github.com/WebKit/WebKit/commit/f1f25a76c3445b463f6ff94ab3ec5e97e3bdec3d
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-09-28 (Thu, 28 Sep 2023)

  Changed paths:
    M Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h

  Log Message:
  -----------
  Optimize various SVGPropertyOwnerRegistry operations
https://bugs.webkit.org/show_bug.cgi?id=262333

Reviewed by Ryosuke Niwa.

Optimize various SVGPropertyOwnerRegistry operations by doing a HashMap lookup
instead of iterating all registered attributes.

Many operations on SVGPropertyOwnerRegistry (such as synchronize()) take an
attribute name and only need to affect a single attribute accessor.
SVGPropertyOwnerRegistry contains a HashMap of attribute to accessor so we
can quickly do a lookup to find the right accessor. Previously, the code
would enumerate all HashMap keys to find the expected attribute.

* Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h:
(WebCore::SVGPropertyOwnerRegistry::lookupRecursivelyAndApply):
(WebCore::SVGPropertyOwnerRegistry::lookupRecursivelyAndApplyBaseTypes):

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




More information about the webkit-changes mailing list