0

[Tab Switcher] Default enable deferred tab switcher creation

Default to lazily initializing the tab switcher at startup. This
improves memory usage and jankiness at startup.

See bug for metrics analysis.

Bug: b/40932816
Change-Id: Ia8e4a32250b43edb7a374719ffe54bd81a74b7b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5287976
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Sky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1259526}
This commit is contained in:
Calder Kitagawa
2024-02-12 23:26:00 +00:00
committed by Chromium LUCI CQ
parent ee98e36aec
commit 9922a8ca07
4 changed files with 7 additions and 18 deletions
chrome
android
javatests
src
org
chromium
chrome
browser
browser
flags
android
chrome_feature_list.cc
java
src
org
chromium
chrome
testing/variations

@@ -748,7 +748,11 @@ public class ToolbarPhoneTest {
@Test @Test
@MediumTest @MediumTest
@EnableFeatures(ChromeFeatureList.TAB_TO_GTS_ANIMATION) @EnableFeatures(ChromeFeatureList.TAB_TO_GTS_ANIMATION)
@DisableFeatures({ChromeFeatureList.START_SURFACE_ANDROID, ChromeFeatureList.ANDROID_HUB}) @DisableFeatures({
ChromeFeatureList.START_SURFACE_ANDROID,
ChromeFeatureList.ANDROID_HUB,
ChromeFeatureList.DEFER_TAB_SWITCHER_LAYOUT_CREATION
})
@DisableAnimationsTestRule.EnsureAnimationsOn @DisableAnimationsTestRule.EnsureAnimationsOn
public void testToolbarTabSwitcherButtonNotClickableDuringTransition_startSurfaceDisabled() { public void testToolbarTabSwitcherButtonNotClickableDuringTransition_startSurfaceDisabled() {
ChromeTabbedActivity cta = mActivityTestRule.getActivity(); ChromeTabbedActivity cta = mActivityTestRule.getActivity();

@@ -594,7 +594,7 @@ BASE_FEATURE(kDeferNotifyInMotion,
BASE_FEATURE(kDeferTabSwitcherLayoutCreation, BASE_FEATURE(kDeferTabSwitcherLayoutCreation,
"DeferTabSwitcherLayoutCreation", "DeferTabSwitcherLayoutCreation",
base::FEATURE_DISABLED_BY_DEFAULT); base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kDelayTempStripRemoval, BASE_FEATURE(kDelayTempStripRemoval,
"DelayTempStripRemoval", "DelayTempStripRemoval",

@@ -552,7 +552,7 @@ public abstract class ChromeFeatureList {
public static final CachedFlag sCommandLineOnNonRooted = public static final CachedFlag sCommandLineOnNonRooted =
newCachedFlag(COMMAND_LINE_ON_NON_ROOTED, false); newCachedFlag(COMMAND_LINE_ON_NON_ROOTED, false);
public static final CachedFlag sDeferTabSwitcherLayoutCreation = public static final CachedFlag sDeferTabSwitcherLayoutCreation =
newCachedFlag(DEFER_TAB_SWITCHER_LAYOUT_CREATION, false); newCachedFlag(DEFER_TAB_SWITCHER_LAYOUT_CREATION, true);
public static final CachedFlag sDelayTempStripRemoval = public static final CachedFlag sDelayTempStripRemoval =
newCachedFlag(DELAY_TEMP_STRIP_REMOVAL, true); newCachedFlag(DELAY_TEMP_STRIP_REMOVAL, true);
public static final CachedFlag sDragDropIntoOmnibox = public static final CachedFlag sDragDropIntoOmnibox =

@@ -5663,21 +5663,6 @@
] ]
} }
], ],
"DeferTabSwitcherLayoutCreation": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"DeferTabSwitcherLayoutCreation"
]
}
]
}
],
"DeferredOverlayRelease": [ "DeferredOverlayRelease": [
{ {
"platforms": [ "platforms": [