Changeset 241631 in webkit


Ignore:
Timestamp:
Feb 15, 2019 4:35:05 PM (5 years ago)
Author:
Chris Dumez
Message:

[PSON] Disable WebContent process cache on devices with less than 3GB of RAM
https://bugs.webkit.org/show_bug.cgi?id=194726
<rdar://problem/48126255>

Reviewed by Geoffrey Garen.

  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::updateCapacity):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r241624 r241631  
     12019-02-15  Chris Dumez  <cdumez@apple.com>
     2
     3        [PSON] Disable WebContent process cache on devices with less than 3GB of RAM
     4        https://bugs.webkit.org/show_bug.cgi?id=194726
     5        <rdar://problem/48126255>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * UIProcess/WebProcessCache.cpp:
     10        (WebKit::WebProcessCache::updateCapacity):
     11
    1122019-02-15  Andy Estes  <aestes@apple.com>
    213
  • trunk/Source/WebKit/UIProcess/WebProcessCache.cpp

    r241556 r241631  
    105105    } else {
    106106        size_t memorySize = ramSize() / GB;
    107 
    108         // Allow 4 processes in the cache per GB of RAM, up to 30 processes.
    109         m_capacity = std::min<unsigned>(memorySize * 4, 30);
    110         RELEASE_LOG(ProcessSwapping, "%p - WebProcessCache::updateCapacity: Cache has a capacity of %u processes", this, capacity());
     107        if (memorySize < 3) {
     108            m_capacity = 0;
     109            RELEASE_LOG(ProcessSwapping, "%p - WebProcessCache::updateCapacity: Cache is disabled because device does not have enough RAM", this);
     110        } else {
     111            // Allow 4 processes in the cache per GB of RAM, up to 30 processes.
     112            m_capacity = std::min<unsigned>(memorySize * 4, 30);
     113            RELEASE_LOG(ProcessSwapping, "%p - WebProcessCache::updateCapacity: Cache has a capacity of %u processes", this, capacity());
     114        }
    111115    }
    112116
Note: See TracChangeset for help on using the changeset viewer.