WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
119308
Avoid scanning really wide DOMs in textRendererIsNeeded
https://bugs.webkit.org/show_bug.cgi?id=119308
Summary
Avoid scanning really wide DOMs in textRendererIsNeeded
Ryosuke Niwa
Reported
2013-07-30 20:52:27 PDT
Consider merging
https://chromium.googlesource.com/chromium/blink/+/0643cdddb9b19d7515277dc40f68a85cf4ac1ca1
Avoiding creation of a Renderer for the text node is a non-essential memory optimization. So to avoid blowing up on very wide DOMs, this patch limits the number of siblings to visit to 50. It improves the page load time of
http://alexaing.com/
(slowest parse time in alexa top million) from 16.4s -> 4.4s on my z620 linux workstation.
Attachments
GitHub Desktop
(1014.29 KB, image/png)
2023-07-06 14:45 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-09-24 02:46:28 PDT
*** In Text.cpp *** containsOnlyWhitespace does not exist but it exists in:
https://github.com/WebKit/WebKit/blob/43e883ca6575a2913f7d63b35b4fd02ffbe68681/Source/WebCore/editing/cocoa/DataDetection.mm#L381
I tried to find it via "WS" or "Whitespace" but nothing came up. While I found "isFloatingOrOutOfFlowPositioned" else where in the code but I think below one matches more closely:
https://github.com/WebKit/WebKit/blob/61a1009d68c4718583337288956333b630f6e904/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp#L104
____ Just wanted to share - Is it something still go to do or it can be ignored? Thanks!
Ahmad Saleem
Comment 2
2023-07-06 14:45:25 PDT
Created
attachment 466959
[details]
GitHub Desktop This compiles and work but I think we might need AB testing to look into performance and memory benefits on this bit. Anyone interested to do those bits on Apple side?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug