[webkit-changes] [WebKit/WebKit] 32beea: Optimize Intersection Observer computations for in...
Simon Fraser
noreply at github.com
Tue Aug 1 19:48:10 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 32beea64ac2d217858f763d4ac4a877e093b7c13
https://github.com/WebKit/WebKit/commit/32beea64ac2d217858f763d4ac4a877e093b7c13
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-08-01 (Tue, 01 Aug 2023)
Changed paths:
M Source/WebCore/page/IntersectionObserver.cpp
Log Message:
-----------
Optimize Intersection Observer computations for inlines
https://bugs.webkit.org/show_bug.cgi?id=259717
rdar://113238475
Reviewed by Ryosuke Niwa.
When computing intersections for RenderInlines, the code computed absolute quads for the RenderInline and
its continutations, then mapped those to local coordinates. What a waste!
Instead we can just compute those rectangles in local coordinates directly. This drops the time spent in
Document::updateIntersectionObservations() from 24% of the time to 14% of the time scrolling an amazon.com
search results page.
* Source/WebCore/page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::computeIntersectionState const):
Canonical link: https://commits.webkit.org/266501@main
More information about the webkit-changes
mailing list