Description[WeakMemoryCache] Remove LRU lists, prune order control and live/dead distinction
This CL removes most of the control mechanisms for prune ordering of Resources
(except one using |m_lastDecodedAccessTime|), including those using the
LRU order, |m_lastDecodedAccessTime|, |m_maxDeferredPruneDeadCapacity|, and
|m_accessCount|.
This enable us to:
- Remove updateDecodedResource(), updateForAccess() and thus
didAccessDecodedData().
- Make update() to do nothing except for |m_size| update.
- Remove |m_liveDecodedResources| and |m_allResources| and make Resources
managed only by the simple hashmaps in |m_resourceMaps|.
- Remove live/dead distinction in MemoryCache.
- Remove min/max dead capacities.
- Merge liveSize() and deadSize() into size().
Removal of min/max dead capacities and live/dead distinction causes more code
outside core/fetch to be unused.
https://codereview.chromium.org/2435603002/ will remove such unused code.
This CL also
- Removes a prune() call in didAccessDecodedData().
- Adds |const| to some methods.
This CL increases web_cache size reported in memory-infra (e.g.
memory.top_10_mobile performance test's web_cache:effective_size_avg), but
this doesn't affect the real memory usage.
Previously, dead Resources were evicted during pruneDeadResources() and such
Resources were not reported to memory-infra.
This CL make such Resources to be reported to memory-infra because this CL
doesn't evict Resources during pruneResources().
BUG=603462
Committed: https://crrev.com/a756f82e21bd1af1025d373c099c8a7e7b589514
Cr-Commit-Position: refs/heads/master@{#432972}
Patch Set 1 #Patch Set 2 : git cl try #Patch Set 3 : temp #Patch Set 4 : fix #Patch Set 5 : cleanup #Patch Set 6 : fix crash #Patch Set 7 : Fix update bug #Patch Set 8 : Rebase #
Total comments: 4
Patch Set 9 : Rebase, rename MemoryCache::setCapacities() #
Total comments: 8
Patch Set 10 : reflect yhirano comments #
Total comments: 4
Patch Set 11 : yhirano's comment about tests #Patch Set 12 : Fix #
Total comments: 2
Patch Set 13 : Rebase2 #Patch Set 14 : Rebase after toyoshim's change #Patch Set 15 : Reflect yhirano's comment #Dependent Patchsets: Messages
Total messages: 69 (53 generated)
|