Bug 21451 - tune cMaxInactiveFontData when cleaning old FontData
Summary: tune cMaxInactiveFontData when cleaning old FontData
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dimitri Glazkov (Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-07 15:29 PDT by Mike Belshe
Modified: 2011-05-05 09:03 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Belshe 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.
Comment 1 mitz 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)?
Comment 2 Dave Hyatt 2008-10-07 17:52:08 PDT
I'm fine with raising the constant if Dan is.

Comment 3 Maciej Stachowiak 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.
Comment 4 Maciej Stachowiak 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.
Comment 5 Dimitri Glazkov (Google) 2009-05-01 14:10:05 PDT
I think we'll roll our fork out and see what difference it makes.
Comment 6 Dimitri Glazkov (Google) 2011-05-05 09:03:43 PDT
Obsoleting old bugs.