New issue
Advanced search Search tips

Issue 673571 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2016
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

ARC: Device is slow to respond to inputs

Project Member Reported by yusukes@chromium.org, Dec 13 2016

Issue description

This is for b/33377533

 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e3f59ed9bdc15fc1cccc737e425d40a077c36a32

commit e3f59ed9bdc15fc1cccc737e425d40a077c36a32
Author: yusukes <yusukes@chromium.org>
Date: Tue Dec 13 18:41:28 2016

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}

[modify] https://crrev.com/e3f59ed9bdc15fc1cccc737e425d40a077c36a32/chrome/browser/ui/app_list/arc/arc_app_icon.cc

Labels: M-56
Changing this to P1 M56 per b/33377533#comment8 to #comment10
The CL is live on the canary channel (9086.0.0). Requesting merge.
Labels: Merge-Request-56
+Merge-Request-56 (based on b/33377533)

The CL is only for OS_CHROME, and the function modified is called only when ARC is enabled.

Comment 5 by dimu@chromium.org, Dec 15 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 15 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67fac5e016806049e25da6d6e0dd06be69170bb1

commit 67fac5e016806049e25da6d6e0dd06be69170bb1
Author: Yusuke Sato <yusukes@google.com>
Date: Thu Dec 15 16:09:00 2016

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)

Review-Url: https://codereview.chromium.org/2580753003 .
Cr-Commit-Position: refs/branch-heads/2924@{#511}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/67fac5e016806049e25da6d6e0dd06be69170bb1/chrome/browser/ui/app_list/arc/arc_app_icon.cc

Status: Fixed (was: Started)
Project Member

Comment 8 by sheriffbot@chromium.org, Dec 16 2016

Labels: Merge-Review-56 Hotlist-Merge-Review
This bug requires manual review: No test file found in commits.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 9 by sheriffbot@chromium.org, Dec 16 2016

This bug requires manual review: No test file found in commits.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 10 by dimu@google.com, Dec 16 2016

Labels: -Merge-Review-56 -Hotlist-Merge-Review
[Automated comment] removing mislabelled Merge-Review-56, Hotlist-Merge-Review
Status: Verified (was: Fixed)

Sign in to add a comment