Commit 7e97095c authored by Filip Gorski's avatar Filip Gorski Committed by Commit Bot

[OSL-RV] Temporary memory increase mitigation

This is a change that will hopefully help us understand the regression
and in the long run propose a reasonable trade off between memory
cost of view reuse, performance and functionality we get.

As an added bonus, this should make the view creation numbers match
those of a ListView more closely.

Bug: 1087720, 1087691
Change-Id: Iaaccb17f1eaa59058179e476ef303cfdaff68611
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225128
Commit-Queue: Filip Gorski <fgorski@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773788}
parent 67c52b67
...@@ -146,6 +146,12 @@ public class OmniboxSuggestionsRecyclerView ...@@ -146,6 +146,12 @@ public class OmniboxSuggestionsRecyclerView
super.setAdapter(mAdapter); super.setAdapter(mAdapter);
} }
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
getRecycledViewPool().clear();
}
@Override @Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
try (TraceEvent tracing = TraceEvent.scoped("OmniboxSuggestionsList.Measure"); try (TraceEvent tracing = TraceEvent.scoped("OmniboxSuggestionsList.Measure");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment