Title: [196495] trunk/Source/WebCore
- Revision
- 196495
- Author
- [email protected]
- Date
- 2016-02-12 12:22:54 -0800 (Fri, 12 Feb 2016)
Log Message
Throw out all live resource decoded data on memory pressure / suspension.
<https://webkit.org/b/154176>
Reviewed by Antti Koivisto.
When pruning live resource decoded data from the memory cache,
we normally avoid pruning anything that's been painted in the last second.
This is an optimization to avoid getting into image decoding loops.
For memory pressure / process suspension scenarios this doesn't really
make sense though:
- In the pressure case, if we have to render again soon it'll likely
be a new GIF frame which we have to decode anyway.
- In the process suspension case, we might *never* render again,
so we should be good citizens and drop all the decoded data we can.
This patch makes us drop all the decoded data, recently painted or not.
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (196494 => 196495)
--- trunk/Source/WebCore/ChangeLog 2016-02-12 20:20:41 UTC (rev 196494)
+++ trunk/Source/WebCore/ChangeLog 2016-02-12 20:22:54 UTC (rev 196495)
@@ -1,3 +1,28 @@
+2016-02-12 Andreas Kling <[email protected]>
+
+ Throw out all live resource decoded data on memory pressure / suspension.
+ <https://webkit.org/b/154176>
+
+ Reviewed by Antti Koivisto.
+
+ When pruning live resource decoded data from the memory cache,
+ we normally avoid pruning anything that's been painted in the last second.
+ This is an optimization to avoid getting into image decoding loops.
+
+ For memory pressure / process suspension scenarios this doesn't really
+ make sense though:
+
+ - In the pressure case, if we have to render again soon it'll likely
+ be a new GIF frame which we have to decode anyway.
+
+ - In the process suspension case, we might *never* render again,
+ so we should be good citizens and drop all the decoded data we can.
+
+ This patch makes us drop all the decoded data, recently painted or not.
+
+ * platform/MemoryPressureHandler.cpp:
+ (WebCore::MemoryPressureHandler::releaseCriticalMemory):
+
2016-02-12 Gavin Barraclough <[email protected]>
Separate out !allowsAccess path in JSDOMWindowCustom getOwnPropertySlot
Modified: trunk/Source/WebCore/platform/MemoryPressureHandler.cpp (196494 => 196495)
--- trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2016-02-12 20:20:41 UTC (rev 196494)
+++ trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2016-02-12 20:22:54 UTC (rev 196495)
@@ -119,7 +119,7 @@
{
ReliefLogger log("Prune MemoryCache live resources");
- MemoryCache::singleton().pruneLiveResourcesToSize(0);
+ MemoryCache::singleton().pruneLiveResourcesToSize(0, /*shouldDestroyDecodedDataForAllLiveResources*/ true);
}
{
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes