Remove N^3 walk of the frame tree
https://bugs.webkit.org/show_bug.cgi?id=265326
Summary Remove N^3 walk of the frame tree
Ahmad Saleem
Reported 2023-11-24 15:10:44 PST
Hi Team, I came across this potential optimization but I am not 100% sure, it would be applicable as is in Safari / WebKit but I notice same function and code, so I thought to raise it. Blink Commit: https://chromium.googlesource.com/chromium/blink/+/d16821075540cf768b4bb812d4d518f70b12a413 "While walking the frame tree during layout, at every node of the walk, we'd walk down the frame tree again to update the "can blit on scroll" bit. At each node of that recursive walk, we'd walk all the way back to the root to check for being unable to blit-on-scroll in our parent frame. This CL remove the eager computation of this state and instead just computes it on demand when we're about to scroll. Computing the information on demand is fast, we just need to walk up to the root of the frame tree. The N^3 algorithm was added by Simon Fraser in http://trac.webkit.org/changeset/71194" WebKit Source: https://searchfox.org/wubkat/rev/aa809c03fded1f6f0c99d562ee397ee2f472fee9/Source/WebCore/page/LocalFrameView.cpp#418 , https://searchfox.org/wubkat/rev/aa809c03fded1f6f0c99d562ee397ee2f472fee9/Source/WebCore/page/LocalFrameView.cpp#1458 & https://searchfox.org/wubkat/rev/aa809c03fded1f6f0c99d562ee397ee2f472fee9/Source/WebCore/platform/ScrollView.h#167 etc. Just wanted to raise to see, if it is worthwhile fix or in another shape or form to improve performance. Thanks!
Attachments
Local Patch - 1 (1.68 MB, image/png)
2023-12-18 09:25 PST, Ahmad Saleem
no flags
Local Patch - 2 (1.74 MB, image/png)
2023-12-18 09:25 PST, Ahmad Saleem
no flags
Radar WebKit Bug Importer
Comment 1 2023-12-01 15:11:13 PST
Ahmad Saleem
Comment 2 2023-12-18 09:25:16 PST
Created attachment 469112 [details] Local Patch - 1
Ahmad Saleem
Comment 3 2023-12-18 09:25:31 PST
Created attachment 469113 [details] Local Patch - 2
Ahmad Saleem
Comment 4 2023-12-18 09:26:21 PST
NOTE - This patch adds 'FIXME', which was removed later in Blink to do normal fixes, so it does not need to be added.
Note You need to log in before you can comment on or make changes to this bug.