Bug 186737

Summary: cssTextCache wastes 102KB of HashTable capacity on cnn.com
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Simon Fraser (smfr) 2018-06-16 12:32:43 PDT
Using tooling from bug 186698, loading can and running "notifyutil -p com.apple.WebKit.dumpHashTableCapacity" shows:

Wasted capacity: 101856 bytes (used 29216 of 131072 bytes, utilization: 22.29%) - 1 allocations
1   0x10749b465 WTF::HashTable<WebCore::CSSPrimitiveValue const*, WTF::KeyValuePair<WebCore::CSSPrimitiveValue const*, WTF::String>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::CSSPrimitiveValue const*, WTF::String> >, WTF::PtrHash<WebCore::CSSPrimitiveValue const*>, WTF::HashMap<WebCore::CSSPrimitiveValue const*, WTF::String, WTF::PtrHash<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WTF::String> >::KeyValuePairTraits, WTF::HashTraits<WebCore::CSSPrimitiveValue const*> >::HashTable()
2   0x10749b445 WTF::HashMap<WebCore::CSSPrimitiveValue const*, WTF::String, WTF::PtrHash<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WTF::String> >::HashMap()
3   0x10749b3f5 WTF::HashMap<WebCore::CSSPrimitiveValue const*, WTF::String, WTF::PtrHash<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WTF::String> >::HashMap()
4   0x10749b380 WTF::NeverDestroyed<WTF::HashMap<WebCore::CSSPrimitiveValue const*, WTF::String, WTF::PtrHash<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WTF::String> > >::NeverDestroyed<>()
5   0x10749b325 WTF::NeverDestroyed<WTF::HashMap<WebCore::CSSPrimitiveValue const*, WTF::String, WTF::PtrHash<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WebCore::CSSPrimitiveValue const*>, WTF::HashTraits<WTF::String> > >::NeverDestroyed<>()
6   0x107494a7d WebCore::cssTextCache()
7   0x107496cb7 WebCore::CSSPrimitiveValue::customCSSText() const
8   0x1074c15aa WebCore::CSSValue::cssText() const
Comment 1 Radar WebKit Bug Importer 2018-06-16 12:33:15 PDT
<rdar://problem/41189178>