[Webkit-unassigned] [Bug 14601] New: WebCore/Windows: too many FontData object and takes too much memory

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 13 03:35:27 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14601

           Summary: WebCore/Windows: too many FontData object and takes too
                    much memory
           Product: WebKit
           Version: 522+ (nightly)
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: 808caaa4.8ce9.9cd6c799e9f6 at gmail.com


In WebCore::FontCache::getFontDataForCharacters(),
many many FontData/FontPlatformData objects created with same constructor
parameters.

HFONT by IMLangFontLink2 is cached result(documented in MSDN docs).
FontPlatformData objects have CFFont object, work buffer, for each.

FontData/FontPlatformData objects live as long as the process lives.
Another saying, objects isn't destroyed even after closing assosiated views.


Example: viewing news.google.co.jp, with caching FontData objects like this:

-------------------------
.../WebCore/platform/win/FontCacheWin.cpp
-------------------------
fontData = new FontData(FontPlatformData(result,
font.fontDescription().computedPixelSize(), font.fontDescription().bold(),
font.fontDescription().italic()));
->
fontData = CreateFontDataWithCache(result,
font.fontDescription().computedPixelSize(), font.fontDescription().bold(),
font.fontDescription().italic());
-------------------------

Results: only 8 objects created, and almost 1400 objects avoided from creation,
30MB memory seems to be saved (71MB used without cache, 40MB used with cache.)


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list