Bug 186741 - FontCascadeFonts WidthCache wastes 170KB of HashTable capacity on nytimes.com
Summary: FontCascadeFonts WidthCache wastes 170KB of HashTable capacity on nytimes.com
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-16 12:42 PDT by Simon Fraser (smfr)
Modified: 2018-06-16 12:42 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-06-16 12:42:18 PDT
Using tooling from bug 186698, loading can and running "notifyutil -p com.apple.WebKit.dumpHashTableCapacity" shows:

Wasted capacity: 170920 bytes (used 85720 of 256640 bytes, utilization: 33.40%) - 137 allocations
1   0x10834b3c5 WTF::HashTable<WebCore::WidthCache::SmallStringKey, WTF::KeyValuePair<WebCore::WidthCache::SmallStringKey, float>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::WidthCache::SmallStringKey, float> >, WebCore::WidthCache::SmallStringKeyHash, WTF::HashMap<WebCore::WidthCache::SmallStringKey, float, WebCore::WidthCache::SmallStringKeyHash, WebCore::WidthCache::SmallStringKeyHashTraits, WTF::HashTraits<float> >::KeyValuePairTraits, WebCore::WidthCache::SmallStringKeyHashTraits>::HashTable()
2   0x10834b3a5 WTF::HashMap<WebCore::WidthCache::SmallStringKey, float, WebCore::WidthCache::SmallStringKeyHash, WebCore::WidthCache::SmallStringKeyHashTraits, WTF::HashTraits<float> >::HashMap()
3   0x10834b225 WTF::HashMap<WebCore::WidthCache::SmallStringKey, float, WebCore::WidthCache::SmallStringKeyHash, WebCore::WidthCache::SmallStringKeyHashTraits, WTF::HashTraits<float> >::HashMap()
4   0x10834b1de WebCore::WidthCache::WidthCache()
5   0x10833b065 WebCore::WidthCache::WidthCache()
6   0x10833aee7 WebCore::FontCascadeFonts::FontCascadeFonts(WTF::RefPtr<WebCore::FontSelector, WTF::DumbPtrTraits<WebCore::FontSelector> >&&)
7   0x10833b0cd WebCore::FontCascadeFonts::FontCascadeFonts(WTF::RefPtr<WebCore::FontSelector, WTF::DumbPtrTraits<WebCore::FontSelector> >&&)
8   0x10834378f WebCore::FontCascadeFonts::create(WTF::RefPtr<WebCore::FontSelector, WTF::DumbPtrTraits<WebCore::FontSelector> >&&)
Comment 1 Radar WebKit Bug Importer 2018-06-16 12:42:38 PDT
<rdar://problem/41189283>