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

Issue 830647 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

[MacViews-Browser] Tabspinner lags at beginning of the site-loading

Project Member Reported by meh...@chromium.org, Apr 9 2018

Issue description

Chrome Version: Canary 67.0.3390.0
OS: macOS 10.12.6

What steps will reproduce the problem?
(1) Open a New Tab
(2) Focus the Omnibox and visit a site
(3) Take a look at the Tabspinner when the site-loading starts

What is the expected result?
The Tabspinner animation should not lag at the beginning of the site-loading. It should be smooth as in Cocoa Mode.

What happens instead?
The Tabspinner animation lags at the beginning of the site-loading.

Please use labels and text to provide additional information.
Two screencasts (Cocoa vs. MacViews) are attached.


 
Cocoa.mov
2.4 MB View Download
MacViews.mov
2.2 MB View Download
Cc: shrike@chromium.org
+ shrike@. He implemented the MD-Tabspinner on Mac recently. Maybe he has an idea and can help :-)
Labels: M-68 MacViews-Browser Target-68
Owner: erikc...@chromium.org
Status: Assigned (was: Untriaged)
erikchen: ptal? :)
Took a trace during tab opening. Looks like the main thread gets some jank due to Views::Paint and RenderText::Elide. Investigating.
trace_opening_tab_trace.json.gz
7.3 MB Download

Comment 4 by gov...@chromium.org, Apr 25 2018

Pls mark the bug as fixed if CL is landed in trunk and nothing else is pending. Thank you.
Attaching another trace that shows problems with RenderWidgetHostImpl::PauseForPendingResizeOrRepaints. 

See https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_host_impl.cc?type=cs&q=PauseForPendingResizeOrRepaints&sq=package:chromium&l=1025 [potentialy 167ms main thread sleep]

The fundamental problem is that the animation used to be driven by CA, and thus continued to flow smoothly during main thread jank. And now the animation is driven by views animations which is affected by main thread jank.
trace_trace_opening_tab2.json.gz
4.3 MB Download
I've always found the throbber animation a useful tool for gauging main thread jank :)
There are some ideas starting at https://bugs.chromium.org/p/chromium/issues/detail?id=391646#c41 for moving the tab spinner animation off the main thread by animating a transform on the compositor thread.

Another option is to pre-generate the tab spinner frames and ship them into GPU textures before animating anything.

There's a thread with more about this at https://goto.google.com/xgcmn

Issue 695714 talks about a more drastic overhaul of the loading animation.
I'm all for using less power on net if we can, say, convert a CPU-driven animation to a GPU-driven one, or some other such win.

I'm much less in favor of changes that we'd make to try and keep this specific animation responsive in the face of UI jank when all of views UI animations are main-thread driven.  The problem in that case is jank, let's not bandaid it.

In the particular case of the throbber note that we'll be completely changing its appearance/behavior soon, which may render some of the other detailed discussions about it obsolete.
Labels: -Target-68 Target-69
Labels: MacViews-Release
This bug boils down to reducing jank on UI and IO threads. I've got a proposal to introduce a metric to measure this:
https://docs.google.com/document/d/1wXi4ob6IWANIAIVD2k2a6WmI_BSdTIoipnrsNJdB1N0/edit?ts=5b31398d

but it seems unlikely we're going to make significant progress by M-69.
Labels: Hotlist-Polish
Labels: -MacViews-Release
Labels: -M-68 Group-Performance
Labels: M-68
Labels: -M-68 M-69
Labels: -M-69 -Target-69 M-70 Target-70
This is unlikely to make M-69
 Issue 901011  has been merged into this issue.
Labels: Hotlist-DesktopUIChecked Hotlist-DesktopUIValid
*** UI Mass Triage***

As per dev comments adding labels for expert review.Thank You!

Sign in to add a comment