[WebView] Blink MemoryCache should have some way to react onTrimMemory() callback |
|||||||||
Issue descriptionCurrently it discards image cache, but not memory cache. Memory cache should be discarded as well, regardless of the device memory profile. https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/MemoryCoordinator.cpp?rcl=1469488599&l=39 - It matters for some apps that load images and release it once it is no longer used (Think infinite scroll image list with virtual viewport, for example.) - If WebView doesn't throw away these cache, its memory usage stays high, and makes hosting app killed by system.
,
Jul 27 2016
,
Jul 27 2016
hajimehoshi@, bashi@: could this be triaged by memory team, or do we want to put off until the ongoing efforts around image resource / memory cache handling is done?
,
Jul 27 2016
,
Jul 28 2016
I think we should handle this issue separately because existing efforts aren't for "what should we do when there is a memory pressure". Memory coordinator[1] is supposed to be a right solution for this, but I don't think it will be available soon. Maybe we just want to remove isLowEndDevice() check, but we need to be careful to do that. [1] https://docs.google.com/document/d/1dkUXXmpJk7xBUeQM-olBpTHJ2MXamDgY_kjNrl9JXMs/edit
,
Jul 28 2016
morrita@, BTW, how much does MemoryCache contribute to memory consumption in your application? Is it one of the main memory consumers?
,
Feb 21 2017
,
Feb 24 2017
webview bug cop here.. this one seems important if this is still the case, as webview is single process and can't just kill a renderer to free memory, +haraken as a bump
,
Feb 24 2017
tasak@: Would you take a look at this?
,
Feb 24 2017
,
Mar 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3c0495f5784b674f4ff0792da9a6d7c62815b565 commit 3c0495f5784b674f4ff0792da9a6d7c62815b565 Author: tasak <tasak@google.com> Date: Fri Mar 10 04:17:11 2017 blink MemoryCoordinator::onPurgeMemory should invoke each client's onPurgeMemory. BUG=631822,670539 Review-Url: https://codereview.chromium.org/2732203002 Cr-Commit-Position: refs/heads/master@{#455990} [modify] https://crrev.com/3c0495f5784b674f4ff0792da9a6d7c62815b565/third_party/WebKit/Source/platform/MemoryCoordinator.cpp
,
Aug 2
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by csharrison@chromium.org
, Jul 26 2016