https://bugs.webkit.org/show_bug.cgi?id=69260
Patch by Andreas Kling <kling@webkit.org> 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
+2011-10-03 Andreas Kling <kling@webkit.org>
+
+ 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 <scheglov@google.com>
Right border missing from table with colspan and collapsing border
FontSelector* fontSelector() const { return m_fontSelector.get(); }
unsigned generation() const { return m_generation; }
- typedef HashMap<int, GlyphPageTreeNode*> GlyphPages;
+ struct GlyphPagesHashTraits : HashTraits<int> {
+ static const int minimumTableSize = 16;
+ };
+ typedef HashMap<int, GlyphPageTreeNode*, DefaultHash<int>::Hash, GlyphPagesHashTraits> GlyphPages;
GlyphPageTreeNode* glyphPageZero() const { return m_pageZero; }
const GlyphPages& glyphPages() const { return m_pages; }