Bug 21451

Summary: tune cMaxInactiveFontData when cleaning old FontData
Product: WebKit Reporter: Mike Belshe <mbelshe>
Component: PlatformAssignee: Dimitri Glazkov (Google) <dglazkov>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ddkilzer, mitz, mjs, playmobil, slewis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   

Mike Belshe
Reported 2008-10-07 15:29:12 PDT
When Chromium picked up the latest WebKit; we discovered that our international page cycler test took a ~20% performance hit. This was due to the FontData cleanup. The test is a bit brutal, as it intentionally uses more fonts than users are likely to use. It turns out that tuning cMaxInactiveFontData (FontCache.cpp) from a constant 120 to a constant 256 works around the problem with this test. I'm hoping that this value is currently somewhat arbitrary, so that nobody objects to this change. However, I could submit a patch to allow platform-specific tuning of this value if that is preferred.
Attachments
mitz
Comment 1 2008-10-07 15:56:23 PDT
How much more memory does that amount to? What about other scarce resources used by the cache (GDI handles perhaps)?
Dave Hyatt
Comment 2 2008-10-07 17:52:08 PDT
I'm fine with raising the constant if Dan is.
Maciej Stachowiak
Comment 3 2008-11-06 13:48:35 PST
I think an international test of this sort would almost certainly use more fonts than any normal user would, since most people do not browse to pages using many different scripts. I do not think it would be a good tradeoff to use more memory for solely for the benefit of such a benchmark, if we do not think it would help any real browsing scenario. However, it would help to have data on the increase in memory use from changing this constant.
Maciej Stachowiak
Comment 4 2008-11-06 13:49:42 PST
Another useful piece of data would be to determine how many different fonts are loaded in the course of typical browsing for various users.
Dimitri Glazkov (Google)
Comment 5 2009-05-01 14:10:05 PDT
I think we'll roll our fork out and see what difference it makes.
Dimitri Glazkov (Google)
Comment 6 2011-05-05 09:03:43 PDT
Obsoleting old bugs.
Note You need to log in before you can comment on or make changes to this bug.