Title: [201857] trunk/Source/WebKit2
Revision
201857
Author
[email protected]
Date
2016-06-09 01:41:54 -0700 (Thu, 09 Jun 2016)

Log Message

Increase disk cache capacity when there is lots of free space
https://bugs.webkit.org/show_bug.cgi?id=158526

Reviewed by Chris Dumez.

Our maximum disk cache capacity has been 175MB for a very long time. Meanwhile the average resource size has grown
massively. 175MB is now enough for cacheable resources of a few dozen sites at most. Using bigger caches when there is
room for it can reduce network traffic, reduce disk writes, save battery and speed up page loading.

This patch changes cache size for PrimaryWebBrowser cache model

>=16GB free: 175MB -> 500MB
8-16GB free: 150MB -> 250MB

and modestly for DocumentBrowser

>=16GB free: 50MB -> 75MB

Note that if system (on Cocoa platforms) really needs disk space it will wipe out caches so this doesn't reduce
available disk space in scenarios like software installation.

* Shared/CacheModel.cpp:
(WebKit::calculateCacheSizes):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (201856 => 201857)


--- trunk/Source/WebKit2/ChangeLog	2016-06-09 06:55:26 UTC (rev 201856)
+++ trunk/Source/WebKit2/ChangeLog	2016-06-09 08:41:54 UTC (rev 201857)
@@ -1,3 +1,29 @@
+2016-06-08  Antti Koivisto  <[email protected]>
+
+        Increase disk cache capacity when there is lots of free space
+        https://bugs.webkit.org/show_bug.cgi?id=158526
+
+        Reviewed by Chris Dumez.
+
+        Our maximum disk cache capacity has been 175MB for a very long time. Meanwhile the average resource size has grown
+        massively. 175MB is now enough for cacheable resources of a few dozen sites at most. Using bigger caches when there is
+        room for it can reduce network traffic, reduce disk writes, save battery and speed up page loading.
+
+        This patch changes cache size for PrimaryWebBrowser cache model
+
+        >=16GB free: 175MB -> 500MB
+        8-16GB free: 150MB -> 250MB
+
+        and modestly for DocumentBrowser
+
+        >=16GB free: 50MB -> 75MB
+
+        Note that if system (on Cocoa platforms) really needs disk space it will wipe out caches so this doesn't reduce
+        available disk space in scenarios like software installation.
+
+        * Shared/CacheModel.cpp:
+        (WebKit::calculateCacheSizes):
+
 2016-06-08  Youenn Fablet  <[email protected]>
 
         Introduce ResourceErrorBase::type

Modified: trunk/Source/WebKit2/Shared/CacheModel.cpp (201856 => 201857)


--- trunk/Source/WebKit2/Shared/CacheModel.cpp	2016-06-09 06:55:26 UTC (rev 201856)
+++ trunk/Source/WebKit2/Shared/CacheModel.cpp	2016-06-09 08:41:54 UTC (rev 201857)
@@ -55,7 +55,7 @@
         // Foundation memory cache capacity (in bytes)
         urlCacheMemoryCapacity = 0;
 
-        // Foundation disk cache capacity (in bytes)
+        // Disk cache capacity (in bytes)
         urlCacheDiskCapacity = 0;
 
         break;
@@ -92,9 +92,9 @@
         else
             urlCacheMemoryCapacity =      512 * 1024; 
 
-        // Foundation disk cache capacity (in bytes)
+        // Disk cache capacity (in bytes)
         if (diskFreeSize >= 16384)
-            urlCacheDiskCapacity = 50 * 1024 * 1024;
+            urlCacheDiskCapacity = 75 * 1024 * 1024;
         else if (diskFreeSize >= 8192)
             urlCacheDiskCapacity = 40 * 1024 * 1024;
         else if (diskFreeSize >= 4096)
@@ -153,11 +153,11 @@
             urlCacheMemoryCapacity =      512 * 1024;
 #endif
 
-        // Foundation disk cache capacity (in bytes)
+        // Disk cache capacity (in bytes)
         if (diskFreeSize >= 16384)
-            urlCacheDiskCapacity = 175 * 1024 * 1024;
+            urlCacheDiskCapacity = 500 * 1024 * 1024;
         else if (diskFreeSize >= 8192)
-            urlCacheDiskCapacity = 150 * 1024 * 1024;
+            urlCacheDiskCapacity = 250 * 1024 * 1024;
         else if (diskFreeSize >= 4096)
             urlCacheDiskCapacity = 125 * 1024 * 1024;
         else if (diskFreeSize >= 2048)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to