Drop ToolbarViewResourceAdapter bitmap under memory pressure |
|||
Issue descriptionViewResourceAdapters (in particular the ToolbarViewResourceAdapter) keep a cache of the rendered view but are already able to deal with outdated bitmaps anyway, so we could drop that bitmap at some point, for example under memory pressure. I've got a small prototype that seems to do the job.
,
Jul 19 2017
Indeed. We should just see what happens in the case where we drop it. If we could force simulate memory pressure easily, it would be cool to get a video of it dropping while scrolling off or just before we start the scroll. It is definitely one of the last things I think we should drop, but if it prevents the page from being killed, having the omnibox flicker one frame seems like an OK compromise.
,
Jul 19 2017
We can simulate memory pressure via adb: adb shell am send-trim-memory com.android.chrome RUNNING_CRITICAL
,
Jul 20 2017
I tested with my prototype a bit and didn't see any jank when scrolling on the page or side-swiping. I've uploaded the CL at https://chromium-review.googlesource.com/c/577869/ if anyone wants to take a look.
,
Oct 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a1c8ef36d3468f1369efb2bbc81ec39018edba31 commit a1c8ef36d3468f1369efb2bbc81ec39018edba31 Author: Bernhard Bauer <bauerb@chromium.org> Date: Mon Oct 16 19:12:24 2017 Drop ToolbarViewResourceAdapter bitmap under memory pressure. To force a memory pressure signal for testing, run this command: $ adb shell am send-trim-memory <package> RUNNING_CRITICAL Bug: 746472 Change-Id: Ib3d74f7de537ae8ae0f2c04f4228e53a9747349b Reviewed-on: https://chromium-review.googlesource.com/577869 Commit-Queue: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#509129} [modify] https://crrev.com/a1c8ef36d3468f1369efb2bbc81ec39018edba31/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java [modify] https://crrev.com/a1c8ef36d3468f1369efb2bbc81ec39018edba31/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
,
Jan 22 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by twelling...@chromium.org
, Jul 19 2017