⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 197638 in webkit


Ignore:
Timestamp:
Mar 6, 2016, 4:04:30 AM (11 years ago)
Author:
akling@apple.com
Message:

Reduce page cache capacity from 3 to 2.
<​https://webkit.org/b/155087>

Reviewed by Antti Koivisto.

Source/WebKit/mac:

Trim WebKit1 page cache capacities consistently with WebKit2.

  • WebView/WebView.mm:

(+[WebView _setCacheModel:]):

Source/WebKit2:

It's extremely rare that users go back more than 2 pages in the page cache,
and nowadays the network cache makes even un-cached pages fast to reload.

Trimming the page cache from 3 to 2 entries has a very nice effect on heap
fragmentation. I'm seeing a ~5% progression on the iPad PLUM test locally;
average memory usage across 300 loads goes from ~121MB to ~114MB.

  • Shared/CacheModel.cpp:

(WebKit::calculateCacheSizes):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r197628 r197638  
     12016-03-06  Andreas Kling  <akling@apple.com>
     2
     3        Reduce page cache capacity from 3 to 2.
     4        <https://webkit.org/b/155087>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Trim WebKit1 page cache capacities consistently with WebKit2.
     9
     10        * WebView/WebView.mm:
     11        (+[WebView _setCacheModel:]):
     12
    1132016-03-05  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r197628 r197638  
    78807880    case WebCacheModelDocumentBrowser: {
    78817881        // Page cache capacity (in pages)
    7882         if (memSize >= 1024)
    7883             pageCacheSize = 3;
    7884         else if (memSize >= 512)
     7882        if (memSize >= 512)
    78857883            pageCacheSize = 2;
    78867884        else if (memSize >= 256)
    … …  
    79337931    case WebCacheModelPrimaryWebBrowser: {
    79347932        // Page cache capacity (in pages)
    7935         // Research indicates that value / page drops substantially after 3 pages.
    7936         if (memSize >= 1024)
    7937             pageCacheSize = 3;
    7938         else if (memSize >= 512)
     7933        if (memSize >= 512)
    79397934            pageCacheSize = 2;
    79407935        else if (memSize >= 256)
  • trunk/Source/WebKit2/ChangeLog

    r197632 r197638  
     12016-03-06  Andreas Kling  <akling@apple.com>
     2
     3        Reduce page cache capacity from 3 to 2.
     4        <https://webkit.org/b/155087>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        It's extremely rare that users go back more than 2 pages in the page cache,
     9        and nowadays the network cache makes even un-cached pages fast to reload.
     10
     11        Trimming the page cache from 3 to 2 entries has a very nice effect on heap
     12        fragmentation. I'm seeing a ~5% progression on the iPad PLUM test locally;
     13        average memory usage across 300 loads goes from ~121MB to ~114MB.
     14
     15        * Shared/CacheModel.cpp:
     16        (WebKit::calculateCacheSizes):
     17
    1182016-03-05  Sam Weinig  <sam@webkit.org>
    219
  • trunk/Source/WebKit2/Shared/CacheModel.cpp

    r169550 r197638  
    6363    case CacheModelDocumentBrowser: {
    6464        // Page cache capacity (in pages)
    65         if (memorySize >= 1024)
    66             pageCacheCapacity = 3;
    67         else if (memorySize >= 512)
     65        if (memorySize >= 512)
    6866            pageCacheCapacity = 2;
    6967        else if (memorySize >= 256)
    … …  
    109107    case CacheModelPrimaryWebBrowser: {
    110108        // Page cache capacity (in pages)
    111         if (memorySize >= 1024)
    112             pageCacheCapacity = 3;
    113         else if (memorySize >= 512)
     109        if (memorySize >= 512)
    114110            pageCacheCapacity = 2;
    115111        else if (memorySize >= 256)
Note: See TracChangeset for help on using the changeset viewer.