Bug 83268

Summary: [Meta][Performance] Major DOM tree traversal should be de-virtualized as possible
Product: WebKit Reporter: Hajime Morrita <morrita>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, apavlov, ap, bfulgham, catfish.man, kling, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 82701, 83269, 86175    
Bug Blocks:    

Hajime Morrita
Reported 2012-04-05 04:59:32 PDT
There are many virtual methods which does DOM tree traversal and node-specific actions. But some of there method has only a few overrides other than one for tree traversal its self. Such methods includes insertedIntoDocument, insertedIntoTree, removedFromDocument, removedFromTree, willRemove, attach and detach. It looks possible to de-virtualize (and even inline) these method by - pull tree traversal out from ContainerNode/Element - Employ a node flags to declare the existence of overrides - inline methods for major DOM classes (that include Text and Element) Since a large part of DOM nodes don't have node-specific overrides other than major classes above, These inlining will gain certain performance win. I'll start from easier ones and see how it work.
Attachments
Ahmad Saleem
Comment 1 2022-08-17 04:34:34 PDT
rniwa@webkit.org - All dependent bugs are fixed, is something separately needed for this META bug? Appreciate your input. Thanks!
Ryosuke Niwa
Comment 2 2022-08-17 12:38:24 PDT
Yeah, this is done.
Note You need to log in before you can comment on or make changes to this bug.