Bug 21451
Summary: | tune cMaxInactiveFontData when cleaning old FontData | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mike Belshe <mbelshe> |
Component: | Platform | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
mitz
How much more memory does that amount to? What about other scarce resources used by the cache (GDI handles perhaps)?
Dave Hyatt
I'm fine with raising the constant if Dan is.
Maciej Stachowiak
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
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)
I think we'll roll our fork out and see what difference it makes.
Dimitri Glazkov (Google)
Obsoleting old bugs.