Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 1382353002: Oilpan: promptly dispose style resolvers upon clearing. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only expose dispose()s to Oilpan Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 911f80a8e9fae0bf945bcae6ae0992cfaf416e35..0588074be6a2cf90f442f116cdf653d485fd46d0 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -427,6 +427,15 @@ void StyleEngine::clearResolver()
if (m_resolver) {
TRACE_EVENT1("blink", "StyleEngine::clearResolver", "frame", document().frame());
+#if ENABLE(OILPAN)
+ // The StyleResolver is a heavy object having a number of collection objects
+ // attached. Attempt to promptly recycle their backing storage objects which
+ // are on the Oilpan collection heaps, so as to increase the chance of
+ // heap storage reuse without having to involve the Oilpan GC. Helpful for
+ // workloads that stresses (re)creation of StyleResolvers and/or have high
+ // allocation rates.
+ m_resolver->dispose();
+#endif
m_resolver.clear();
}
}
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp ('k') | third_party/WebKit/Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698