Bug 69260

Summary: FontFallbackList: Glyph pages waste a lot of memory.
Product: WebKit Reporter: Andreas Kling <kling>
Component: TextAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: koivisto, mitz, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch none

Description Andreas Kling 2011-10-03 08:21:36 PDT
The m_pages hash map in FontFallbackList is defined as follows:

typedef HashMap<int, GlyphPageTreeNode*> GlyphPages;
GlyphPages m_pages;

This uses the default HashMap minimum table size of 64 buckets which is quite wasteful in many cases.

One idea is to lower the minimum table size using hash traits. A patch will follow that lowers it to 16, which reduces memory consumption by ~900 kB when loading the full HTML5 spec.
Comment 1 Andreas Kling 2011-10-03 08:25:23 PDT
Created attachment 109486 [details]
Proposed patch
Comment 2 WebKit Review Bot 2011-10-03 09:50:00 PDT
Comment on attachment 109486 [details]
Proposed patch

Clearing flags on attachment: 109486

Committed r96512: <http://trac.webkit.org/changeset/96512>
Comment 3 WebKit Review Bot 2011-10-03 09:50:04 PDT
All reviewed patches have been landed.  Closing bug.