Changeset 209456 in webkit
- Timestamp:
- Dec 7, 2016, 8:27:34 AM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r209451 r209456 1 2016-12-07 Andreas Kling <akling@apple.com> 2 3 [iOS] Remove bitrotted FrameLoader attempt to limit page caching under memory pressure. 4 <https://webkit.org/b/165527> 5 6 Reviewed by Antti Koivisto. 7 8 This code no longer does anything, as the page cache is hard capped 9 at 0 entries while under memory pressure. 10 11 * loader/FrameLoader.cpp: 12 (WebCore::FrameLoader::commitProvisionalLoad): 13 1 14 2016-12-06 Antoine Quint <graouts@apple.com> 2 15 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r209181 r209456 137 137 #include "ResourceLoader.h" 138 138 #include "RuntimeApplicationChecks.h" 139 #include "SystemMemory.h"140 139 #include "WKContentObservation.h" 141 140 #endif … … 149 148 150 149 static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; 151 152 #if PLATFORM(IOS)153 const int memoryLevelThresholdToPrunePageCache = 20;154 #endif155 150 156 151 bool isBackForwardLoadType(FrameLoadType type) … … 1766 1761 m_frame.document() ? m_frame.document()->url().stringCenterEllipsizedToLength().utf8().data() : "", 1767 1762 pdl ? pdl->url().stringCenterEllipsizedToLength().utf8().data() : "<no provisional DocumentLoader>"); 1768 1769 #if PLATFORM(IOS)1770 // In the case where we are not navigating to a cached page, and the system is under (speculative) memory pressure,1771 // we can try to preemptively release some of the pages in the cache.1772 // FIXME: Right now the capacity is 1 on iOS devices with 256 MB of RAM, so this will always blow away the whole1773 // page cache. We could still preemptively prune the page cache while navigating to a cached page if capacity > 1.1774 // See <rdar://problem/11779846> for more details.1775 if (!cachedPage) {1776 if (MemoryPressureHandler::singleton().isUnderMemoryPressure()) {1777 LOG(MemoryPressure, "Pruning page cache because under memory pressure at: %s", __PRETTY_FUNCTION__);1778 LOG(PageCache, "Pruning page cache to 0 due to memory pressure");1779 // Don't cache any page if we are under memory pressure.1780 PageCache::singleton().pruneToSizeNow(0, PruningReason::MemoryPressure);1781 } else if (systemMemoryLevel() <= memoryLevelThresholdToPrunePageCache) {1782 LOG(MemoryPressure, "Pruning page cache because system memory level is %d at: %s", systemMemoryLevel(), __PRETTY_FUNCTION__);1783 auto& pageCache = PageCache::singleton();1784 LOG(PageCache, "Pruning page cache to %d due to low memory (level %d less or equal to %d threshold)", pageCache.maxSize() / 2, systemMemoryLevel(), memoryLevelThresholdToPrunePageCache);1785 pageCache.pruneToSizeNow(pageCache.maxSize() / 2, PruningReason::MemoryPressure);1786 }1787 }1788 #endif1789 1763 1790 1764 willTransitionToCommitted();
Note:
See TracChangeset
for help on using the changeset viewer.