New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612682 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Eliding Bookmark Name/URL in Bookmark Bar 'tooltip' in every MouseEvent freezes browser/ui

Project Member Reported by djkurtz@chromium.org, May 18 2016

Issue description

Chrome Version: 52.0.2727.0
Chrome OS Version: 8302.0.0
Chrome OS Platform: peach_pi (also reproduced on oak and cyan)

Steps To Reproduce:
(1) Enable the bookmark bar
(2) Navigate to: 
    https://en.wikipedia.org/wiki/List_of_law_clerks_of_the_Supreme_Court_of_the_United_States
(3) Add the URL to the bookmark bar, and ensure it is visible
(4) Navigate to any page with animation, for example:
    http://webglsamples.org/aquarium/aquarium.html
(5) Use Mouse/Trackpad to move pointer over top of the "US Law Clerks" bookmark button

(6) Bonus: Wiggle mouse on top of button

Expected Result:

UI continues to animate smoothly as mouse enters/moves/crosses bookmark buttons.

Actual Result:

UI animation pauses/stutters when mouse enters bookmark.
Bonus: UI animation will grind to a halt.

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)

Always.

What is the impact to the user, and is there a workaround? If so, what is
it?

Strange UI hiccups when mousing over bookmark bar.

Please provide any additional information below. Attach a screen shot or
log if possible.

Two attachemnts:
[0] trace_peach_pi-mouse-thumbnail-elide.json.gz
[1] trace_z620-mouse-thumbnail-elide.json.gz

For [0], it is pretty obvious from the trace what is happening:
The pointer first enters the bookmark button at 2,557.063 ms
(search for EventFactoryEvdev::DispatchMouseMoveEvent).
It takes 23.173 ms to process this event.
Considering input events arrive every ~3.8 ms, the machine can't keep up and
consumes 100% CPU processing input events, freezing the UI.
The "RenderText::Elide" operation alone takes ~8.69 ms, probably because
each (long) call to RenderTextHarfBuzz::EnsureLayoutRunList() takes > 1 ms
(compare this to the result below).
ssww
Note: I can see similar traces on desktop linux (50.0.2661.102).

For [1], this is taken on a z620 running desktop chrome.
The mouse events w/ Elide start @ 1,910.858 ms (search for "RenderText::Elide").
On the z620, the RenderTextHarfBuzz::EnsureLayoutRunList() is < ~400 us,
and the total DesktopWindowTreeHostX11::Dispatch wall time is < ~8 ms.
Since the Dispatch calls (ie X11 mouse move events) are ~8.5 ms apart, the UI
still has time to do some other work, and the UI does not appear to pause/hang.


Adding a bunch of labels, since this effect seems to be caused by a combination of event handling, the bookmark bar, UI, and Text processing (harfbuzz).
 
trace_peach_pi-mouse-thumbnail-elide.json.gz
4.1 MB Download
trace_z620-mouse-thumbnail-elide.json.gz
2.4 MB Download

Comment 1 by tkent@chromium.org, May 24 2016

Components: -Blink>Text
Labels: -OS-Linux

Comment 2 by osh...@chromium.org, May 27 2016

The current text eliding impl is known to be show. I made a few improvements last year, but it's still slow. I don't have time to fix this complete (the best way would be to migrate to the text renderer that blink is using), but I'll take a look and see if we can mitigate this.
Cc: est...@chromium.org zork@chromium.org zelidrag@chromium.org littlecvr@chromium.org hsiangc@chromium.org adlr@chromium.org sky@chromium.org dbehr@chromium.org osh...@chromium.org
 Issue 597261  has been merged into this issue.
Status: WontFix (was: Assigned)
Tooltip no longer updates per move, so it should be much better now.
Status: Assigned (was: WontFix)
In which version is this fixed?  It is still pretty bad in ToT (56.0.2915.0).

Comment 6 by osh...@chromium.org, Nov 16 2016

Status: Fixed (was: Assigned)
I'm on 55.0.2883.42, and it no longer updates the tooltip per mouse move, which this bug is about. Please see attached video.

If your issue is about slow eliding (which is true), please file a separate bug.

If that's not the case, please upload the video.
tooltip.mp4
26.1 MB Download
The behavior is still the same on my device:
Google Chrome	55.0.2883.42 (Official Build) beta (32-bit)
Platform	8872.44.0 (Official Build) beta-channel elm

slow_ui_mouse_over_elided_bookmrk.webm
1.6 MB View Download
Status: Assigned (was: Fixed)
Every MouseMoveEvent still takes 11.5 ms, because it is calling RenderText:Elide.
trace_mouse_over_tooltip_elide.json.gz
3.2 MB Download

Comment 9 by osh...@chromium.org, Nov 16 2016

Thanks, there is another path that isn't tooltip code itself. I'll take a look.
Status: Fixed (was: Assigned)
Labels: Merge-Request-56 Merge-Request-55
Shall we merge to M-55 (and did the fixes land in time for M-56)?

Comment 13 by dimu@chromium.org, Nov 18 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)

Comment 14 by dimu@chromium.org, Nov 18 2016

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

Comment 16 by bugdroid1@chromium.org, Nov 22 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6a4d6d8670c5b9da20f522f21eabfdf0c62dd803

commit 6a4d6d8670c5b9da20f522f21eabfdf0c62dd803
Author: Mitsuru Oshima <oshima@chromium.org>
Date: Tue Nov 22 15:42:46 2016

Update the bookmark tooltip text only when necessary

BUG= 612682 
TEST=manual. see bug for repro step.

Review URL: https://codereview.chromium.org/2524773002 .

Cr-Commit-Position: refs/branch-heads/2883@{#648}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/6a4d6d8670c5b9da20f522f21eabfdf0c62dd803/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
[modify] https://crrev.com/6a4d6d8670c5b9da20f522f21eabfdf0c62dd803/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
[modify] https://crrev.com/6a4d6d8670c5b9da20f522f21eabfdf0c62dd803/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
Fix for 55 is in 55.0.2883.64 / 8872.64.0
Fix landed just before 57 branch, in: 56.0.2924.0 / 9000.2.0.

Verified on 57.0.2926.0 / 9015.0.
Project Member

Comment 19 by sheriffbot@chromium.org, Nov 30 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

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

Comment 20 by sheriffbot@chromium.org, Dec 4 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

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

Sign in to add a comment