Bug 139628

Summary: Remove FontCachePurgePreventer
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mmaxfield, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch andersca: review+

Description Antti Koivisto 2014-12-14 12:39:51 PST
We should only purge font cache on top of the runloop. Then this stack helper can go away.
Comment 1 Antti Koivisto 2015-01-11 14:42:22 PST
Created attachment 244425 [details]
patch
Comment 2 Antti Koivisto 2015-01-11 14:58:50 PST
https://trac.webkit.org/r178250
Comment 3 Antti Koivisto 2015-01-11 15:03:24 PST
This fix rdar://problem/19431581 which was

0   com.apple.WebCore             	0x000000010a58cce0 WTF::Ref<WebCore::FontGlyphs>::get() + 16
1   com.apple.WebCore             	0x000000010a5893e0 WebCore::pruneUnreferencedEntriesFromFontGlyphsCache() + 176
2   com.apple.WebCore             	0x000000010a5995b2 WebCore::FontCache::purgeInactiveFontData(int) + 34
3   com.apple.WebCore             	0x000000010a59946c WebCore::FontCache::purgeInactiveFontDataIfNeeded() + 156
4   com.apple.WebCore             	0x0000000109ff962c WebCore::FontCache::enablePurging() + 108
5   com.apple.WebCore             	0x0000000109ff95b9 WebCore::FontCachePurgePreventer::~FontCachePurgePreventer() + 25
6   com.apple.WebCore             	0x0000000109ff6765 WebCore::FontCachePurgePreventer::~FontCachePurgePreventer() + 21
7   com.apple.WebCore             	0x000000010b6d036a WebCore::RenderSVGText::removeChild(WebCore::RenderObject&) + 106
...
83  com.apple.WebCore             	0x000000010a589491 WebCore::pruneUnreferencedEntriesFromFontGlyphsCache() + 353
84  com.apple.WebCore             	0x000000010a589c21 WebCore::retrieveOrAddCachedFontGlyphs(WebCore::FontDescription const&, WTF::PassRefPtr<WebCore::FontSelector>) + 1697
Comment 4 Ryosuke Niwa 2015-01-23 21:37:41 PST
Looks like this was 2.5% regression on PLT (see Mavericks results)?
Comment 5 Antti Koivisto 2015-01-24 08:48:10 PST
The regression was fixed in https://trac.webkit.org/r178673
Comment 6 Antti Koivisto 2015-01-24 08:49:41 PST
Unfortunately the bot was down so the step change from the commit is not visible.