Title: [188217] trunk/Source/WebKit/mac
Revision
188217
Author
cdu...@apple.com
Date
2015-08-10 11:57:47 -0700 (Mon, 10 Aug 2015)

Log Message

Align WebKit1's PageCache size with WebKit2's
https://bugs.webkit.org/show_bug.cgi?id=147831

Reviewed by Sam Weinig.

Align WebKit1's PageCache size with WebKit2's for consistency. Also, we
have data showing that keeping more than 3 pages in the PageCache is
not really useful.

* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (188216 => 188217)


--- trunk/Source/WebKit/mac/ChangeLog	2015-08-10 18:06:12 UTC (rev 188216)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-08-10 18:57:47 UTC (rev 188217)
@@ -1,3 +1,17 @@
+2015-08-10  Chris Dumez  <cdu...@apple.com>
+
+        Align WebKit1's PageCache size with WebKit2's
+        https://bugs.webkit.org/show_bug.cgi?id=147831
+
+        Reviewed by Sam Weinig.
+
+        Align WebKit1's PageCache size with WebKit2's for consistency. Also, we
+        have data showing that keeping more than 3 pages in the PageCache is
+        not really useful.
+
+        * WebView/WebView.mm:
+        (+[WebView _setCacheModel:]):
+
 2015-08-06  Anders Carlsson  <ander...@apple.com>
 
         Crashes when calling swizzled setNeedsDisplayInRect: on heartbeat thread

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (188216 => 188217)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2015-08-10 18:06:12 UTC (rev 188216)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2015-08-10 18:57:47 UTC (rev 188217)
@@ -7838,26 +7838,16 @@
     }
     case WebCacheModelPrimaryWebBrowser: {
         // Page cache capacity (in pages)
-        // (Research indicates that value / page drops substantially after 3 pages.)
-        if (memSize >= 2048)
-            pageCacheSize = 5;
-        else if (memSize >= 1024)
-            pageCacheSize = 4;
-        else if (memSize >= 512)
+        // Research indicates that value / page drops substantially after 3 pages.
+        if (memSize >= 1024)
             pageCacheSize = 3;
-        else if (memSize >= 256)
+        else if (memSize >= 512)
             pageCacheSize = 2;
-        else
+        else if (memSize >= 256)
             pageCacheSize = 1;
+        else
+            pageCacheSize = 0;
 
-#if PLATFORM(IOS)
-        // Cache page less aggressively in iOS to reduce the chance of being jettisoned.
-        // FIXME (<rdar://problem/11779846>): Avoiding jettisoning should not have to require reducing the page cache capacity.
-        // Reducing the capacity by 1 reduces overall back-forward performance.
-        if (pageCacheSize > 0)
-            pageCacheSize -= 1;
-#endif
-
         // Object cache capacities (in bytes)
         // (Testing indicates that value / MB depends heavily on content and
         // browsing pattern. Even growth above 128MB can have substantial 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to