[webkit-changes] [WebKit/WebKit] 3c3c8d: Avoid unnecessary work in the Node destructor

Chris Dumez noreply at github.com
Wed Mar 8 19:33:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3c3c8d0c2261e71726f571a2b1ebea4a74dfce8e
      https://github.com/WebKit/WebKit/commit/3c3c8d0c2261e71726f571a2b1ebea4a74dfce8e
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-03-08 (Wed, 08 Mar 2023)

  Changed paths:
    M Source/WebCore/dom/Node.cpp

  Log Message:
  -----------
  Avoid unnecessary work in the Node destructor
https://bugs.webkit.org/show_bug.cgi?id=253607

Reviewed by Ryosuke Niwa.

Avoid unnecessary work in the Node destructor, as it is hot on Speedometer.
The destructor was calling TextManipulationController::removeNode(), which
would remove the Node from TextManipulationController's m_manipulatedNodes
and m_textNodesWithNewRenderer. Both of these are WeakHashSet so there is
no need to remove Nodes from these before they get destructed.

* Source/WebCore/dom/Node.cpp:
(WebCore::Node::~Node):

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




More information about the webkit-changes mailing list