From: commit-queue@webkit.org Date: Mon, 3 Oct 2011 16:50:53 +0000 (+0000) Subject: FontFallbackList: Glyph pages waste a lot of memory. X-Git-Tag: 070512121124~23182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=553a508ffe1aa2ce2e23e7a8ec7bf81a0fc5acec;p=profile%2Fivi%2Fwebkit-efl.git FontFallbackList: Glyph pages waste a lot of memory. https://bugs.webkit.org/show_bug.cgi?id=69260 Patch by Andreas Kling on 2011-10-03 Reviewed by Dan Bernstein. Use a minimum hash table size of 16 (down from 64) for FontFallbackList's glyph pages. This reduces memory consumption by ~900 kB when loading the full HTML5 spec. The cost is two additional rehash()es of FontFallbackList::m_pages when adding the 32nd and 64th pages to the hash map. * platform/graphics/FontFallbackList.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96512 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index baa4773..589419a 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,19 @@ +2011-10-03 Andreas Kling + + FontFallbackList: Glyph pages waste a lot of memory. + https://bugs.webkit.org/show_bug.cgi?id=69260 + + Reviewed by Dan Bernstein. + + Use a minimum hash table size of 16 (down from 64) for FontFallbackList's + glyph pages. This reduces memory consumption by ~900 kB when loading the + full HTML5 spec. + + The cost is two additional rehash()es of FontFallbackList::m_pages when + adding the 32nd and 64th pages to the hash map. + + * platform/graphics/FontFallbackList.h: + 2011-10-03 Konstantin Scheglov Right border missing from table with colspan and collapsing border diff --git a/Source/WebCore/platform/graphics/FontFallbackList.h b/Source/WebCore/platform/graphics/FontFallbackList.h index 459baba..072033f 100644 --- a/Source/WebCore/platform/graphics/FontFallbackList.h +++ b/Source/WebCore/platform/graphics/FontFallbackList.h @@ -53,7 +53,10 @@ public: FontSelector* fontSelector() const { return m_fontSelector.get(); } unsigned generation() const { return m_generation; } - typedef HashMap GlyphPages; + struct GlyphPagesHashTraits : HashTraits { + static const int minimumTableSize = 16; + }; + typedef HashMap::Hash, GlyphPagesHashTraits> GlyphPages; GlyphPageTreeNode* glyphPageZero() const { return m_pageZero; } const GlyphPages& glyphPages() const { return m_pages; }