New issue
Advanced search Search tips

Issue 833594 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

27ms startup performance regression in BrowserView::GetFullscreenControlHost()

Project Member Reported by wittman@chromium.org, Apr 16 2018

Issue description

Data from the UMA Sampling Profiler shows that BrowserView::GetFullscreenControlHost() regressed browser process UI thread startup on 64-bit Chrome on Windows by 27ms. This occurred in the 67.0.3396.0 Canary release.

The responsible CL appears to be https://chromium.googlesource.com/chromium/src.git/+/1a1af6ef742c2cf50ae82fa3832fb0a56fcdb235

Execution profile difference for the function in Canary 67.0.3395.0 vs. 67.0.3396.0: https://uma.googleplex.com/p/chrome/callstacks?sid=0120af4f0d0d08ab12a006c6006d9336
 

Comment 1 by yuweih@chromium.org, Apr 16 2018

Is it caused by that CL or this CL https://chromium-review.googlesource.com/c/chromium/src/+/1010966 that unconditionally turns on fullscreen exit UI on Canary and Dev?

Calling GetFullscreenControlHost() will create the FullscreenControlHost and add new views to the view hierarchy so it might be inevitable to increase the startup time? What is the general baseline for the startup time?
It could be the other CL too.

The profile difference shows that the increase is almost entirely due to the creation of the popup widget. Can that be delayed until it's actually used?

The closest enclosing major timing metric for this code is Startup.BrowserMessageLoopStartTime which averages about 4s, so this corresponds to roughly a .5% regression in that metric.
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 18 2018

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

commit 87b1f815215cd97ae80cc7a2c25d941bab938091
Author: Yuwei Huang <yuweih@chromium.org>
Date: Wed Apr 18 20:21:46 2018

[Fullscreen Control] Delay creation of FullscreenControlHost

Currently we create FullscreenControlHost when the view hierarchy is
changed, which adds ~27ms to the app startup time. This CL delays the
creation of FullscreenControlHost until the browser enters fullscreen.

Bug:  833594 
Change-Id: I291aa8e84eb154bbda52434d17e430d54c0507c6
Reviewed-on: https://chromium-review.googlesource.com/1014658
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551803}
[modify] https://crrev.com/87b1f815215cd97ae80cc7a2c25d941bab938091/chrome/browser/ui/views/frame/browser_view.cc

Comment 4 by yuweih@chromium.org, Apr 20 2018

Labels: Merge-Request-67
Project Member

Comment 5 by sheriffbot@chromium.org, Apr 21 2018

Labels: -Merge-Request-67 Merge-Approved-67 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M67. Please go ahead and merge the CL to branch 3396 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

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

Comment 6 by gov...@chromium.org, Apr 21 2018

Pls merge your change to M67 branch 3396 by 1:00 PM PT, Monday (04/23) so we can pick it up next M67 Dev/Beta release. Thank you.
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 23 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/355fdb6c929410ab6587c5ade557f324e7af9300

commit 355fdb6c929410ab6587c5ade557f324e7af9300
Author: Yuwei Huang <yuweih@chromium.org>
Date: Mon Apr 23 04:43:02 2018

[Fullscreen Control] Delay creation of FullscreenControlHost

Currently we create FullscreenControlHost when the view hierarchy is
changed, which adds ~27ms to the app startup time. This CL delays the
creation of FullscreenControlHost until the browser enters fullscreen.

Bug:  833594 
Change-Id: I291aa8e84eb154bbda52434d17e430d54c0507c6
Reviewed-on: https://chromium-review.googlesource.com/1014658
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#551803}(cherry picked from commit 87b1f815215cd97ae80cc7a2c25d941bab938091)
Reviewed-on: https://chromium-review.googlesource.com/1023182
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#201}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/355fdb6c929410ab6587c5ade557f324e7af9300/chrome/browser/ui/views/frame/browser_view.cc

Comment 8 by yuweih@chromium.org, Apr 24 2018

Cc: wittman@chromium.org
wittman@ could you confirm that the 27ms startup time is gone in the new 3396 build?
Status: Verified (was: Assigned)
Yes, we see a decrease of 33ms due to FullScreenControlHost in 68.0.3400.0: https://uma.googleplex.com/p/chrome/callstacks?sid=ad03011f39545324781c940d1d475ad0

(Fluctuation in the regression size is likely due to population shifts between the two releases.)

Sign in to add a comment