Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Issue 2580753003: arc: Avoid the resize operation in GetImageForScale() whenever possible (Closed)

Created:
4 years ago by Yusuke Sato
Modified:
4 years ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2924
Project:
chromium
Visibility:
Public.

Description

arc: Avoid the resize operation in GetImageForScale() whenever possible to remove UI jank. ArcAppIcon::Source::GetImageForScale() is one of the lowest level functions for the ARC app icon stuff which can easily be called thousands of times while e.g. the user enters a few characters to the app search box. However, the function does a relatively heavy Skia operation, gfx::ImageSkiaOperations::CreateResizedImage() with RESIZE_BEST, against either IDR_APP_DEFAULT_ICON or IDR_ARC_SUPPORT_ICON_NN, and b/33377533 shows that the operation actually slows down Chrome OS UI significantly. For example, on a recent Chromebook, pressing Search, then entering pressing characters to the app search box freezes the browser's UI thread for about (5 * num_of_arc_apps * num_of_key_presses) milliseconds. If you enter 5 characters, and your device has 50 ARC apps, the UI freezes for about 1.25 seconds. This CL removes the bottleneck by avoiding the heavy resize operation when possible. BUG=673571 TEST=Install 50+ ARC apps to make the issue much more apparent, press Search to show the text area for app search, enter a few characters to the area, confirm that the UI is still responsive. TEST=chrome://tracing (input latency mode) does not show any long tasks in the UI thread anymore. Review-Url: https://codereview.chromium.org/2567253002 Cr-Commit-Position: refs/heads/master@{#438238} (cherry picked from commit e3f59ed9bdc15fc1cccc737e425d40a077c36a32) Committed: https://chromium.googlesource.com/chromium/src/+/67fac5e016806049e25da6d6e0dd06be69170bb1

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -5 lines) Patch
M chrome/browser/ui/app_list/arc/arc_app_icon.cc View 4 chunks +30 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
Yusuke Sato
4 years ago (2016-12-15 16:14:23 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
67fac5e016806049e25da6d6e0dd06be69170bb1.

Powered by Google App Engine
This is Rietveld 408576698