<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>83268</bug_id>
          
          <creation_ts>2012-04-05 04:59:32 -0700</creation_ts>
          <short_desc>[Meta][Performance] Major DOM tree traversal should be de-virtualized as possible</short_desc>
          <delta_ts>2022-08-17 12:38:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>82701</dependson>
    
    <dependson>83269</dependson>
    
    <dependson>86175</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hajime Morrita">morrita</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>apavlov</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>catfish.man</cc>
    
    <cc>kling</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>596490</commentid>
    <comment_count>0</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2012-04-05 04:59:32 -0700</bug_when>
    <thetext>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&apos;t have node-specific overrides other than major classes above, 
These inlining will gain certain performance win.

I&apos;ll start from easier ones and see how it work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1891918</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-17 04:34:34 -0700</bug_when>
    <thetext>rniwa@webkit.org - All dependent bugs are fixed, is something separately needed for this META bug? Appreciate your input. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892017</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-08-17 12:38:24 -0700</bug_when>
    <thetext>Yeah, this is done.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>