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.
*** 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!
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?