Bug 240440

Summary: frequently restyled content can spend significant time recomputing whether text nodes are entirely HTML space characters
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Cameron McCormack (:heycam) 2022-05-15 18:35:17 PDT
In the MotionMark Design subtest, we spend 1% of Web content process time in isAllSpecialCharacters<isHTMLSpace> under TreeResolver::resolveComposedTree.  This is because the cloned <table> elements that are used for the text trails have all white space text nodes between tags, and we end up looking through all those text node characters.  We can cache the result in a node flag to avoid this.
Comment 1 Radar WebKit Bug Importer 2022-05-15 18:35:25 PDT
<rdar://problem/93319600>
Comment 2 Cameron McCormack (:heycam) 2023-05-29 19:57:41 PDT
Closing this as unneeded for now.