Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Unified Diff: content/common/dwrite_font_platform_win.cc

Issue 869003002: Experimental tuning for DirectWrite font cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified font test data files for content tests. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/test/data/font/dwrite_font_cache_arial.dat » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/dwrite_font_platform_win.cc
diff --git a/content/common/dwrite_font_platform_win.cc b/content/common/dwrite_font_platform_win.cc
index 0cba230d98fcba32db046253f193e2277b4455b4..c2547b5ea323842894728211f92e750a84788c13 100644
--- a/content/common/dwrite_font_platform_win.cc
+++ b/content/common/dwrite_font_platform_win.cc
@@ -69,7 +69,7 @@ const char kFontKeyName[] = "font_key_name";
// phase. If we don't use this percentile formula we will end up
// increasing significant cache size by caching entire file contents
// for some of the font files.
-const double kMaxPercentileOfFontFileSizeToCache = 0.5;
+const double kMaxPercentileOfFontFileSizeToCache = 0.6;
// With current implementation we map entire shared section into memory during
// renderer startup. This causes increase in working set of Chrome. As first
@@ -77,14 +77,14 @@ const double kMaxPercentileOfFontFileSizeToCache = 0.5;
// users, so we are putting arbitrary limit on cache file size. There are
// multiple ways we can tune our working size, like mapping only required part
// of section at any given time.
-const double kArbitraryCacheFileSizeLimit = (20 * 1024 * 1024);
+const double kArbitraryCacheFileSizeLimit = (30 * 1024 * 1024);
// We have chosen current font file length arbitrarily. In our logic
// if we don't find file we are looking for in cache we end up loading
// that file directly from system fonts folder.
const unsigned int kMaxFontFileNameLength = 34;
-const DWORD kCacheFileVersion = 102;
+const DWORD kCacheFileVersion = 103;
const DWORD kFileSignature = 0x4D4F5243; // CROM
const DWORD kMagicCompletionSignature = 0x454E4F44; // DONE
« no previous file with comments | « no previous file | content/test/data/font/dwrite_font_cache_arial.dat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698