<?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>109505</bug_id>
          
          <creation_ts>2013-02-11 15:30:16 -0800</creation_ts>
          <short_desc>The ElementData Refactoring of Glory</short_desc>
          <delta_ts>2017-03-14 13:14:01 -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>109529</dependson>
    
    <dependson>109610</dependson>
    
    <dependson>109643</dependson>
    
    <dependson>109752</dependson>
    
    <dependson>109756</dependson>
    
    <dependson>109888</dependson>
    
    <dependson>109959</dependson>
    
    <dependson>109976</dependson>
    
    <dependson>110025</dependson>
    
    <dependson>113938</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Kling">kling</reporter>
          <assigned_to name="Andreas Kling">kling</assigned_to>
          <cc>kling</cc>
    
    <cc>koivisto</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>830218</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-02-11 15:30:16 -0800</bug_when>
    <thetext>Some of my ideas for ElementAttributeData:

* Class renames:
  - ElementAttributeData =&gt; ElementData
  - MutableElementAttributeData =&gt; PrivateElementData
  - ImmutableElementAttributeData =&gt; SharableElementAttributeData

I&apos;m removing &quot;Attribute&quot; from the name since I plan to move non-Attribute things (specifically, the Element&apos;s tag name into ElementData.)
Private/Sharable are better descriptions of what Mutable/Immutable data really are.

* Move ElementData &amp; co into Element.h/cpp. They should really just act as dumb containers for Element, so any logic belongs in there.

* Unionize Element::m_tagQName and Element::m_elementData (m_tagQName will be in m_elementData-&gt;tagQName if the relevant Node flag is set.)
  - This could save ~500 KB on the Membuster3 benchmark.
  - This clever idea (C) Antti.

* Replace the three ElementData members for &quot;cooked&quot; versions of the id/class/style attributes by indices.
  - Let Attribute::m_value be either an AtomicStringImpl* OR one of three special AttributeValue classes (e.g IdAttributeValue, StyleAttributeValue and ClassAttributeValue.)
  - This could save ~1000 KB on the Membuster3 benchmark.

* Make it possible to mutate the attributes in a SharableElementData without turning into a PrivateElementData, assuming it hasOneRef().
  - This could save ~800 KB on the Membuster3 benchmark.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287763</commentid>
    <comment_count>1</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2017-03-14 13:14:01 -0700</bug_when>
    <thetext>Let&apos;s consider this done. The remaining ideas are too cheesy and the risk:reward ratio does not justify complicating the code any further.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>