Title: [196468] trunk/Source/WebCore
- Revision
- 196468
- Author
- [email protected]
- Date
- 2016-02-12 04:39:45 -0800 (Fri, 12 Feb 2016)
Log Message
Don't invalidate the FontCache on memory pressure.
<https://webkit.org/b/154161>
Reviewed by Antti Koivisto.
Invalidating the FontCache does more harm than good:
- Anything that's still in the cache at this point is also
referenced outside the cache, thus will not actually get deleted.
- Future deduplication will fail, leading to more objects.
- The global FontCache generation gets bumped, causing future style
recalcs to be less efficient and breaking style sharing.
- All FontSelector invalidation callbacks will fire, potentially
causing forced full-document style recalcs.
In fact, the only win from invalidating the FontCache comes from some
minor shrinkage in the containers that make up the cache itself.
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (196467 => 196468)
--- trunk/Source/WebCore/ChangeLog 2016-02-12 11:37:31 UTC (rev 196467)
+++ trunk/Source/WebCore/ChangeLog 2016-02-12 12:39:45 UTC (rev 196468)
@@ -1,3 +1,29 @@
+2016-02-12 Andreas Kling <[email protected]>
+
+ Don't invalidate the FontCache on memory pressure.
+ <https://webkit.org/b/154161>
+
+ Reviewed by Antti Koivisto.
+
+ Invalidating the FontCache does more harm than good:
+
+ - Anything that's still in the cache at this point is also
+ referenced outside the cache, thus will not actually get deleted.
+
+ - Future deduplication will fail, leading to more objects.
+
+ - The global FontCache generation gets bumped, causing future style
+ recalcs to be less efficient and breaking style sharing.
+
+ - All FontSelector invalidation callbacks will fire, potentially
+ causing forced full-document style recalcs.
+
+ In fact, the only win from invalidating the FontCache comes from some
+ minor shrinkage in the containers that make up the cache itself.
+
+ * platform/MemoryPressureHandler.cpp:
+ (WebCore::MemoryPressureHandler::releaseCriticalMemory): Deleted.
+
2016-02-11 Chris Dumez <[email protected]>
[Web IDL] interfaces should inherit EventTarget instead of duplicating the EventTarget API
Modified: trunk/Source/WebCore/platform/MemoryPressureHandler.cpp (196467 => 196468)
--- trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2016-02-12 11:37:31 UTC (rev 196467)
+++ trunk/Source/WebCore/platform/MemoryPressureHandler.cpp 2016-02-12 12:39:45 UTC (rev 196468)
@@ -140,11 +140,6 @@
GCController::singleton().deleteAllCode();
}
- {
- ReliefLogger log("Invalidate font cache");
- FontCache::singleton().invalidate();
- }
-
#if ENABLE(VIDEO)
{
ReliefLogger log("Dropping buffered data from paused media elements");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes