Title: [197839] releases/WebKitGTK/webkit-2.12/Source/WebCore
- Revision
- 197839
- Author
- [email protected]
- Date
- 2016-03-08 23:42:04 -0800 (Tue, 08 Mar 2016)
Log Message
Merge r197552 - Drop DocumentSharedObjectPool immediately when going into PageCache.
<https://webkit.org/b/154986>
Reviewed by Antti Koivisto.
The DocumentSharedObjectPool is a weirdly efficient little optimization
that deduplicates ElementData during the first 10s of a Document's lifetime.
While it's up, every ElementData created will persist so it can be used for
deduplication.
If a Document goes into the PageCache while its shared object pool is still
alive, we can just kill it right away. This will sometimes allow us to free
a bunch of ElementData sooner.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setInPageCache):
(WebCore::Document::clearSharedObjectPool):
(WebCore::Document::sharedObjectPoolClearTimerFired): Deleted.
* dom/Document.h:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (197838 => 197839)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-03-09 07:29:43 UTC (rev 197838)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-03-09 07:42:04 UTC (rev 197839)
@@ -1,3 +1,26 @@
+2016-03-04 Andreas Kling <[email protected]>
+
+ Drop DocumentSharedObjectPool immediately when going into PageCache.
+ <https://webkit.org/b/154986>
+
+ Reviewed by Antti Koivisto.
+
+ The DocumentSharedObjectPool is a weirdly efficient little optimization
+ that deduplicates ElementData during the first 10s of a Document's lifetime.
+ While it's up, every ElementData created will persist so it can be used for
+ deduplication.
+
+ If a Document goes into the PageCache while its shared object pool is still
+ alive, we can just kill it right away. This will sometimes allow us to free
+ a bunch of ElementData sooner.
+
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::setInPageCache):
+ (WebCore::Document::clearSharedObjectPool):
+ (WebCore::Document::sharedObjectPoolClearTimerFired): Deleted.
+ * dom/Document.h:
+
2016-03-03 Miguel Gomez <[email protected]>
[TextureMapper] Use RGBA format for textures attached to framebuffers
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.cpp (197838 => 197839)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.cpp 2016-03-09 07:29:43 UTC (rev 197838)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.cpp 2016-03-09 07:42:04 UTC (rev 197839)
@@ -532,7 +532,7 @@
, m_scheduledTasksAreSuspended(false)
, m_visualUpdatesAllowed(true)
, m_visualUpdatesSuppressionTimer(*this, &Document::visualUpdatesSuppressionTimerFired)
- , m_sharedObjectPoolClearTimer(*this, &Document::sharedObjectPoolClearTimerFired)
+ , m_sharedObjectPoolClearTimer(*this, &Document::clearSharedObjectPool)
#ifndef NDEBUG
, m_didDispatchViewportPropertiesChanged(false)
#endif
@@ -4591,6 +4591,7 @@
clearStyleResolver();
clearSelectorQueryCache();
+ clearSharedObjectPool();
} else {
if (childNeedsStyleRecalc())
scheduleStyleRecalc();
@@ -5037,9 +5038,10 @@
m_cachedResourceLoader->clearPreloads();
}
-void Document::sharedObjectPoolClearTimerFired()
+void Document::clearSharedObjectPool()
{
m_sharedObjectPool = nullptr;
+ m_sharedObjectPoolClearTimer.stop();
}
#if ENABLE(TELEPHONE_NUMBER_DETECTION)
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.h (197838 => 197839)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.h 2016-03-09 07:29:43 UTC (rev 197838)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.h 2016-03-09 07:42:04 UTC (rev 197839)
@@ -1721,7 +1721,7 @@
RefPtr<NamedFlowCollection> m_namedFlows;
- void sharedObjectPoolClearTimerFired();
+ void clearSharedObjectPool();
Timer m_sharedObjectPoolClearTimer;
std::unique_ptr<DocumentSharedObjectPool> m_sharedObjectPool;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes