Some of my ideas for ElementAttributeData: * Class renames: - ElementAttributeData => ElementData - MutableElementAttributeData => PrivateElementData - ImmutableElementAttributeData => SharableElementAttributeData I'm removing "Attribute" from the name since I plan to move non-Attribute things (specifically, the Element's tag name into ElementData.) Private/Sharable are better descriptions of what Mutable/Immutable data really are. * Move ElementData & 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->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 "cooked" 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.
Let's consider this done. The remaining ideas are too cheesy and the risk:reward ratio does not justify complicating the code any further.