Omnibox answer images should be cached in java |
||
Issue descriptionCurrently, Answers in Suggest on Android fetches and caches the bitmaps for the answers natively. AnswersImage.java -> answers_image_bridge.cc::RequestAnswersImage -> BitmapFetcherService. The bitmap fetcher service caches the bitmaps in native, but the image is then converted (using ConvertToJavaBitmap in OnImageChanged) to a java bitmap for each return to java. This conversion generates a brand new java bitmap w/ duplicate memory. So for every keystroke with a duplicate image request, we are generating a brand new java bitmap. We should potentially not use the bitmap fetcher service at all for this use case and instead use a BitmapFetcher directly and cache only in the java layer.
,
Oct 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c04cd9570e79ce3ccee8639aadb34f7cc9fef607 commit c04cd9570e79ce3ccee8639aadb34f7cc9fef607 Author: Ted Choc <tedchoc@chromium.org> Date: Fri Oct 26 17:24:43 2018 Move Omnibox Answers image cache to java. The C++ image cache requires making a new java bitmap for every cache hit. Since the suggestions are rendered in java widgets, it makes sense to cache purely in java. BUG= 883410 Change-Id: I66d5f1df458e1122e5a0d191ce67c2bf3a7160ab Reviewed-on: https://chromium-review.googlesource.com/c/1300753 Commit-Queue: Ted Choc <tedchoc@chromium.org> Reviewed-by: Matthew Jones <mdjones@chromium.org> Reviewed-by: Rachel Blum <groby@chromium.org> Cr-Commit-Position: refs/heads/master@{#603129} [delete] https://crrev.com/cbcfb3beb1c64044784a409598bbe9f4626a796c/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/AnswersImage.java [add] https://crrev.com/c04cd9570e79ce3ccee8639aadb34f7cc9fef607/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/AnswersImageFetcher.java [modify] https://crrev.com/c04cd9570e79ce3ccee8639aadb34f7cc9fef607/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java [modify] https://crrev.com/c04cd9570e79ce3ccee8639aadb34f7cc9fef607/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxResultsAdapter.java [modify] https://crrev.com/c04cd9570e79ce3ccee8639aadb34f7cc9fef607/chrome/android/java_sources.gni [modify] https://crrev.com/c04cd9570e79ce3ccee8639aadb34f7cc9fef607/chrome/browser/BUILD.gn [modify] https://crrev.com/c04cd9570e79ce3ccee8639aadb34f7cc9fef607/chrome/browser/android/omnibox/answers_image_bridge.cc [modify] https://crrev.com/c04cd9570e79ce3ccee8639aadb34f7cc9fef607/chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc
,
Oct 26
|
||
►
Sign in to add a comment |
||
Comment 1 by mpear...@chromium.org
, Sep 12