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

Unified Diff: chrome/browser/renderer_host/web_cache_manager.cc

Issue 19392003: Limit dead resource capacity in Blink cache to 50%. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/web_cache_manager.cc
diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index 660529eec7e950c464e185ae9ef39ba38d02a74b..5632a9a421d9a41708b239b0d9910f1e579f1030 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -315,15 +315,13 @@ void WebCacheManager::EnactStrategy(const AllocationStrategy& strategy) {
// This is the capacity this renderer has been allocated.
size_t capacity = allocation->second;
- // We don't reserve any space for dead objects in the cache. Instead, we
- // prefer to keep live objects around. There is probably some performance
+ // We don't reserve any space for dead objects in the cache. Instead, we
+ // prefer to keep live objects around. There is probably some performance
// tuning to be done here.
size_t min_dead_capacity = 0;
- // We allow the dead objects to consume all of the cache, if the renderer
- // so desires. If we wanted this memory, we would have set the total
- // capacity lower.
- size_t max_dead_capacity = capacity;
+ // We allow the dead objects to consume up to half of the cache capacity.
+ size_t max_dead_capacity = capacity / 2;
host->Send(new ChromeViewMsg_SetCacheCapacities(min_dead_capacity,
max_dead_capacity,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698