Bug 140495

Summary: REGRESSION(r177876): Membuster regressed ~4%
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, kling, mmaxfield
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
kling: review+
patch kling: review+

Description Antti Koivisto 2015-01-15 06:41:34 PST
Membuster regressed by the cache clearing patch.
Comment 1 Antti Koivisto 2015-01-15 06:46:59 PST
Created attachment 244692 [details]
patch
Comment 2 Andreas Kling 2015-01-15 10:34:20 PST
Comment on attachment 244692 [details]
patch

r=me
Comment 3 Antti Koivisto 2015-01-15 12:08:44 PST
https://trac.webkit.org/r178522
Comment 4 Antti Koivisto 2015-01-20 10:46:46 PST
That didn't fix it.
Comment 5 Antti Koivisto 2015-01-20 11:11:35 PST
Created attachment 245002 [details]
patch
Comment 6 Andreas Kling 2015-01-20 11:47:48 PST
Comment on attachment 245002 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=245002&action=review

r=me

> Source/WebCore/platform/graphics/FontCascade.cpp:296
>      Vector<unsigned, 50> toRemove;
> -    FontGlyphsCache::iterator end = fontGlyphsCache().end();
> -    for (FontGlyphsCache::iterator it = fontGlyphsCache().begin(); it != end; ++it) {
> -        if (it->value->glyphs.get().hasOneRef())
> -            toRemove.append(it->key);
> +    for (auto& entry : fontGlyphsCache()) {
> +        if (entry.value->glyphs.get().hasOneRef())
> +            toRemove.append(entry.key);
>      }
>      for (unsigned i = 0; i < toRemove.size(); ++i)
>          fontGlyphsCache().remove(toRemove[i]);

Jesus man, just use removeIf(), it's not 2014 anymore.
Comment 7 Antti Koivisto 2015-01-21 11:33:35 PST
https://trac.webkit.org/r178853