[webkit-changes] [WebKit/WebKit] 64afe8: REGRESSION: 282146 at main made text entry in a quip ...
Chris Dumez
noreply at github.com
Sun Sep 29 10:46:19 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 64afe80b60e5be3c37c54b3b59d7ced65ed57162
https://github.com/WebKit/WebKit/commit/64afe80b60e5be3c37c54b3b59d7ced65ed57162
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-09-29 (Sun, 29 Sep 2024)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
Log Message:
-----------
REGRESSION: 282146 at main made text entry in a quip document very slow
https://bugs.webkit.org/show_bug.cgi?id=280578
rdar://136905905
Reviewed by Darin Adler.
In 282146 at main, I converted EventTargetSet from a `HashCountedSet<Node*>` to a
`WeakHashCountedSet<Node>` for safety reasons. However, this set is used in hot
code and we end up spending a lot of time in WeakHashMap's amortized cleanup
on certain pages.
To address the performance issue while maintaining safety, I am now using a
`HashCountedSet<CheckedPtr<Node>>`.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::willBeRemovedFromFrame):
(WebCore::Document::wheelEventHandlersChanged):
(WebCore::Document::didAddWheelEventHandler):
(WebCore::removeHandlerFromSet):
(WebCore::Document::didAddTouchEventHandler):
(WebCore::Document::didRemoveEventTargetNode):
(WebCore::Document::absoluteRegionForEventTargets):
* Source/WebCore/dom/Document.h:
(WebCore::Document::hasTouchEventHandlers const):
(WebCore::Document::hasWheelEventHandlers const):
Canonical link: https://commits.webkit.org/284431@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list