[Webkit-unassigned] [Bug 187428] New: SVGAnimationElement is bloated by members of SVGTests
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 6 21:26:24 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=187428
Bug ID: 187428
Summary: SVGAnimationElement is bloated by members of SVGTests
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: SVG
Assignee: webkit-unassigned at lists.webkit.org
Reporter: simon.fraser at apple.com
CC: zimmermann at kde.org
SVGAnimationElement inherits from SVGTests, which has:
SVGSynchronizableAnimatedProperty<SVGStringListValues> m_requiredFeatures;
SVGSynchronizableAnimatedProperty<SVGStringListValues> m_requiredExtensions;
SVGSynchronizableAnimatedProperty<SVGStringListValues> m_systemLanguage;
I don't know why we could have inline data members for attributes that are probably unspecified on 99.9% of SVG elements. Also, these attributes are not animatable according to spec, so I don't know why they have to use SVGSynchronizableAnimatedProperty.
The class layout is very inefficient, because there's padding between each of these data members;
19$ $ ./Tools/Scripts/dump-class-layout -c Release WebCore SVGPathElement
+0 <416> SVGPathElement
+0 <312> WebCore::SVGGeometryElement WebCore::SVGGeometryElement
+0 <304> WebCore::SVGGraphicsElement WebCore::SVGGraphicsElement
+0 <160> WebCore::SVGElement WebCore::SVGElement
+0 < 96> WebCore::StyledElement WebCore::StyledElement
+0 < 96> WebCore::Element WebCore::Element
+0 < 80> WebCore::ContainerNode WebCore::ContainerNode
+0 < 64> WebCore::Node WebCore::Node
+0 < 16> WebCore::EventTarget WebCore::EventTarget
+0 < 8> __vtbl_ptr_type * _vptr
+8 < 8> WebCore::ScriptWrappable WebCore::ScriptWrappable
+8 < 8> JSC::Weak<WebCore::JSDOMObject> m_wrapper
+8 < 8> JSC::WeakImpl * m_impl
+16 < 4> int m_refCount
+20 < 4> uint32_t m_nodeFlags
+24 < 8> WebCore::ContainerNode * m_parentNode
+32 < 8> WebCore::TreeScope * m_treeScope
+40 < 8> WebCore::Node * m_previous
+48 < 8> WebCore::Node * m_next
+56 < 8> WebCore::Node::DataUnion m_data
+64 < 8> WebCore::Node * m_firstChild
+72 < 8> WebCore::Node * m_lastChild
+80 < 8> WebCore::QualifiedName m_tagName
+80 < 8> WTF::RefPtr<WebCore::QualifiedName::QualifiedNameImpl, WTF::DumbPtrTraits<WebCore::QualifiedName::QualifiedNameImpl> > m_impl
+80 < 8> WTF::DumbPtrTraits<WebCore::QualifiedName::QualifiedNameImpl>::StorageType m_ptr
+88 < 8> WTF::RefPtr<WebCore::ElementData, WTF::DumbPtrTraits<WebCore::ElementData> > m_elementData
+88 < 8> WTF::DumbPtrTraits<WebCore::ElementData>::StorageType m_ptr
+96 < 16> WebCore::SVGLangSpace WebCore::SVGLangSpace
+96 < 8> WTF::AtomicString m_lang
+96 < 8> WTF::String m_string
+96 < 8> WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
+96 < 8> WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
+104 < 8> WTF::AtomicString m_space
+104 < 8> WTF::String m_string
+104 < 8> WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
+104 < 8> WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
+112 < 8> std::__1::unique_ptr<WebCore::SVGElementRareData, std::__1::default_delete<WebCore::SVGElementRareData> > m_svgRareData
+112 < 8> std::__1::__compressed_pair<WebCore::SVGElementRareData *, std::__1::default_delete<WebCore::SVGElementRareData> > __ptr_
+112 < 8> std::__1::__compressed_pair_elem<WebCore::SVGElementRareData *, 0, false> std::__1::__compressed_pair_elem<WebCore::SVGElementRareData *, 0, false>
+112 < 8> WebCore::SVGElementRareData * __value_
+112 < 1> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::SVGElementRareData>, 1, true> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::SVGElementRareData>, 1, true>
+112 < 1> std::__1::default_delete<WebCore::SVGElementRareData> std::__1::default_delete<WebCore::SVGElementRareData>
+120 < 24> WTF::HashSet<WebCore::SVGElement *, WTF::PtrHash<WebCore::SVGElement *>, WTF::HashTraits<WebCore::SVGElement *> > m_elementsWithRelativeLengths
+120 < 24> WTF::HashSet<WebCore::SVGElement *, WTF::PtrHash<WebCore::SVGElement *>, WTF::HashTraits<WebCore::SVGElement *> >::HashTableType m_impl
+120 < 8> WTF::HashTable<WebCore::SVGElement *, WebCore::SVGElement *, WTF::IdentityExtractor, WTF::PtrHash<WebCore::SVGElement *>, WTF::HashTraits<WebCore::SVGElement *>, WTF::HashTraits<WebCore::SVGElement *> >::ValueType * m_table
+128 < 4> unsigned int m_tableSize
+132 < 4> unsigned int m_tableSizeMask
+136 < 4> unsigned int m_keyCount
+140 < 4> unsigned int m_deletedCount
+144 < 16> WebCore::SVGSynchronizableAnimatedProperty<WTF::String> m_className
+144 < 8> WTF::String value
+144 < 8> WTF::RefPtr<WTF::StringImpl, WTF::DumbPtrTraits<WTF::StringImpl> > m_impl
+144 < 8> WTF::DumbPtrTraits<WTF::StringImpl>::StorageType m_ptr
+152 < 1> bool shouldSynchronize : 1
+152 < 1> bool isValid : 1
+153 < 7> <PADDING: 7 bytes>
+160 < 8> WebCore::SVGTransformable WebCore::SVGTransformable
+160 < 8> WebCore::SVGLocatable WebCore::SVGLocatable
+160 < 8> __vtbl_ptr_type * _vptr
+168 < 96> WebCore::SVGTests WebCore::SVGTests
+168 < 32> WebCore::SVGSynchronizableAnimatedProperty<WebCore::SVGStringListValues> m_requiredFeatures
+168 < 24> WebCore::SVGStringListValues value
+168 < 16> WTF::Vector<WTF::String, 0, WTF::CrashOnOverflow, 16> WTF::Vector<WTF::String, 0, WTF::CrashOnOverflow, 16>
+168 < 16> WTF::VectorBuffer<WTF::String, 0> WTF::VectorBuffer<WTF::String, 0>
+168 < 16> WTF::VectorBufferBase<WTF::String> WTF::VectorBufferBase<WTF::String>
+168 < 8> WTF::String * m_buffer
+176 < 4> unsigned int m_capacity
+180 < 4> unsigned int m_size
+184 < 8> const WebCore::QualifiedName & m_attributeName
+192 < 1> bool shouldSynchronize : 1
+192 < 1> bool isValid : 1
+361 < 7> <PADDING: 7 bytes>
+200 < 32> WebCore::SVGSynchronizableAnimatedProperty<WebCore::SVGStringListValues> m_requiredExtensions
+200 < 24> WebCore::SVGStringListValues value
+200 < 16> WTF::Vector<WTF::String, 0, WTF::CrashOnOverflow, 16> WTF::Vector<WTF::String, 0, WTF::CrashOnOverflow, 16>
+200 < 16> WTF::VectorBuffer<WTF::String, 0> WTF::VectorBuffer<WTF::String, 0>
+200 < 16> WTF::VectorBufferBase<WTF::String> WTF::VectorBufferBase<WTF::String>
+200 < 8> WTF::String * m_buffer
+208 < 4> unsigned int m_capacity
+212 < 4> unsigned int m_size
+216 < 8> const WebCore::QualifiedName & m_attributeName
+224 < 1> bool shouldSynchronize : 1
+224 < 1> bool isValid : 1
+393 < 7> <PADDING: 7 bytes>
+232 < 32> WebCore::SVGSynchronizableAnimatedProperty<WebCore::SVGStringListValues> m_systemLanguage
+232 < 24> WebCore::SVGStringListValues value
+232 < 16> WTF::Vector<WTF::String, 0, WTF::CrashOnOverflow, 16> WTF::Vector<WTF::String, 0, WTF::CrashOnOverflow, 16>
+232 < 16> WTF::VectorBuffer<WTF::String, 0> WTF::VectorBuffer<WTF::String, 0>
+232 < 16> WTF::VectorBufferBase<WTF::String> WTF::VectorBufferBase<WTF::String>
+232 < 8> WTF::String * m_buffer
+240 < 4> unsigned int m_capacity
+244 < 4> unsigned int m_size
+248 < 8> const WebCore::QualifiedName & m_attributeName
+256 < 1> bool shouldSynchronize : 1
+256 < 1> bool isValid : 1
+257 < 7> <PADDING: 7 bytes>
+264 < 24> WebCore::SVGSynchronizableAnimatedProperty<WebCore::SVGTransformListValues> m_transform
+264 < 16> WebCore::SVGTransformListValues value
+264 < 16> WTF::Vector<WebCore::SVGTransformValue, 0, WTF::CrashOnOverflow, 2> WTF::Vector<WebCore::SVGTransformValue, 0, WTF::CrashOnOverflow, 2>
+264 < 16> WTF::VectorBuffer<WebCore::SVGTransformValue, 0> WTF::VectorBuffer<WebCore::SVGTransformValue, 0>
+264 < 16> WTF::VectorBufferBase<WebCore::SVGTransformValue> WTF::VectorBufferBase<WebCore::SVGTransformValue>
+264 < 8> WebCore::SVGTransformValue * m_buffer
+272 < 4> unsigned int m_capacity
+276 < 4> unsigned int m_size
+280 < 1> bool shouldSynchronize : 1
+280 < 1> bool isValid : 1
+281 < 7> <PADDING: 7 bytes>
+288 < 8> std::__1::unique_ptr<WebCore::AffineTransform, std::__1::default_delete<WebCore::AffineTransform> > m_supplementalTransform
+288 < 8> std::__1::__compressed_pair<WebCore::AffineTransform *, std::__1::default_delete<WebCore::AffineTransform> > __ptr_
+288 < 8> std::__1::__compressed_pair_elem<WebCore::AffineTransform *, 0, false> std::__1::__compressed_pair_elem<WebCore::AffineTransform *, 0, false>
+288 < 8> WebCore::AffineTransform * __value_
+288 < 1> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::AffineTransform>, 1, true> std::__1::__compressed_pair_elem<std::__1::default_delete<WebCore::AffineTransform>, 1, true>
+288 < 1> std::__1::default_delete<WebCore::AffineTransform> std::__1::default_delete<WebCore::AffineTransform>
+296 < 1> bool m_shouldIsolateBlending
+297 < 3> <PADDING: 3 bytes>
+300 < 8> WebCore::SVGSynchronizableAnimatedProperty<float> m_pathLength
+300 < 4> float value
+304 < 1> bool shouldSynchronize : 1
+304 < 1> bool isValid : 1
+305 < 7> <PADDING: 7 bytes>
+312 < 8> WebCore::SVGExternalResourcesRequired WebCore::SVGExternalResourcesRequired
+312 < 8> __vtbl_ptr_type * _vptr
+320 < 8> WTF::CanMakeWeakPtr<WebCore::SVGPathElement> WTF::CanMakeWeakPtr<WebCore::SVGPathElement>
+320 < 8> WTF::WeakPtrFactory<WebCore::SVGPathElement> m_weakFactory
+320 < 8> WTF::RefPtr<WTF::WeakReference<WebCore::SVGPathElement>, WTF::DumbPtrTraits<WTF::WeakReference<WebCore::SVGPathElement> > > m_ref
+320 < 8> WTF::DumbPtrTraits<WTF::WeakReference<WebCore::SVGPathElement> >::StorageType m_ptr
+328 < 8> WebCore::SVGSynchronizableAnimatedProperty<float> m_pathLength
+328 < 4> float value
+332 < 1> bool shouldSynchronize : 1
+332 < 1> bool isValid : 1
+333 < 3> <PADDING: 3 bytes>
+336 < 2> WebCore::SVGSynchronizableAnimatedProperty<bool> m_externalResourcesRequired
+336 < 1> bool value
+337 < 1> bool shouldSynchronize : 1
+337 < 1> bool isValid : 1
+338 < 6> <PADDING: 6 bytes>
+344 < 16> WebCore::SVGPathByteStream m_pathByteStream
+344 < 16> WebCore::SVGPathByteStream::Data m_data
+344 < 16> WTF::VectorBuffer<unsigned char, 0> WTF::VectorBuffer<unsigned char, 0>
+344 < 16> WTF::VectorBufferBase<unsigned char> WTF::VectorBufferBase<unsigned char>
+344 < 8> unsigned char * m_buffer
+352 < 4> unsigned int m_capacity
+356 < 4> unsigned int m_size
+360 < 16> std::optional<WebCore::Path> m_cachedPath
+360 < 16> std::OptionalBase<WebCore::Path> std::OptionalBase<WebCore::Path>
+360 < 1> bool init_
+721 < 7> <PADDING: 7 bytes>
+368 < 8> std::storage_t<WebCore::Path> storage_
+376 < 32> WebCore::SVGSynchronizableAnimatedProperty<WebCore::SVGPathSegListValues> m_pathSegList
+376 < 24> WebCore::SVGPathSegListValues value
+376 < 16> WTF::Vector<WTF::RefPtr<WebCore::SVGPathSeg, WTF::DumbPtrTraits<WebCore::SVGPathSeg> >, 0, WTF::CrashOnOverflow, 16> WTF::Vector<WTF::RefPtr<WebCore::SVGPathSeg, WTF::DumbPtrTraits<WebCore::SVGPathSeg> >, 0, WTF::CrashOnOverflow, 16>
+376 < 16> WTF::VectorBuffer<WTF::RefPtr<WebCore::SVGPathSeg, WTF::DumbPtrTraits<WebCore::SVGPathSeg> >, 0> WTF::VectorBuffer<WTF::RefPtr<WebCore::SVGPathSeg, WTF::DumbPtrTraits<WebCore::SVGPathSeg> >, 0>
+376 < 16> WTF::VectorBufferBase<WTF::RefPtr<WebCore::SVGPathSeg, WTF::DumbPtrTraits<WebCore::SVGPathSeg> > > WTF::VectorBufferBase<WTF::RefPtr<WebCore::SVGPathSeg, WTF::DumbPtrTraits<WebCore::SVGPathSeg> > >
+376 < 8> WTF::RefPtr<WebCore::SVGPathSeg, WTF::DumbPtrTraits<WebCore::SVGPathSeg> > * m_buffer
+384 < 4> unsigned int m_capacity
+388 < 4> unsigned int m_size
+392 < 4> WebCore::SVGPathSegRole m_role
+772 < 4> <PADDING: 4 bytes>
+400 < 1> bool shouldSynchronize : 1
+400 < 1> bool isValid : 1
+401 < 7> <PADDING: 7 bytes>
+408 < 1> bool m_isAnimValObserved
+409 < 7> <PADDING: 7 bytes>
Total byte size: 416
Total pad bytes: 79
Padding percentage: 18.99 %
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180707/20d0960e/attachment-0001.html>
More information about the webkit-unassigned
mailing list