Skip to content

Commit 3a03293

Browse files
authored
Remove timeline frames experiment (enable by default) (#288)
1 parent 933011a commit 3a03293

7 files changed

Lines changed: 4 additions & 43 deletions

File tree

‎front_end/core/rn_experiments/experimentsImpl.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ Instance.register({
185185
enabledByDefault: ({ isReactNativeEntryPoint }) => isReactNativeEntryPoint,
186186
});
187187

188-
Instance.register({
189-
name: RNExperimentName.ENABLE_TIMELINE_FRAMES,
190-
title: 'Enable performance frames track',
191-
unstable: true,
192-
});
193-
194188
Instance.register({
195189
name: RNExperimentName.ENABLE_NETWORK_THROTTLING,
196190
title: 'Enable network throttling (Network panel)',

‎front_end/core/root/Runtime.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ export const experiments = new ExperimentsSupport();
305305
export enum RNExperimentName {
306306
REACT_NATIVE_SPECIFIC_UI = 'react-native-specific-ui',
307307
JS_HEAP_PROFILER_ENABLE = 'js-heap-profiler-enable',
308-
ENABLE_TIMELINE_FRAMES = 'enable-timeline-frames',
309308
ENABLE_NETWORK_THROTTLING = 'enable-network-throttling',
310309
}
311310

@@ -341,7 +340,6 @@ export const enum ExperimentName {
341340
JS_HEAP_PROFILER_ENABLE = RNExperimentName.JS_HEAP_PROFILER_ENABLE,
342341
REACT_NATIVE_SPECIFIC_UI = RNExperimentName.REACT_NATIVE_SPECIFIC_UI,
343342
NOT_REACT_NATIVE_SPECIFIC_UI = '!' + RNExperimentName.REACT_NATIVE_SPECIFIC_UI,
344-
ENABLE_TIMELINE_FRAMES = RNExperimentName.ENABLE_TIMELINE_FRAMES,
345343
ENABLE_NETWORK_THROTTLING = RNExperimentName.ENABLE_NETWORK_THROTTLING,
346344
}
347345

‎front_end/entrypoints/rn_fusebox/FuseboxFeatureObserver.ts‎

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ const UIStrings = {
3535
*/
3636
reloadRequiredForNetworkThrottlingMessage:
3737
'Network throttling is now available in the Network panel. Please reload to enable.',
38-
/**
39-
* @description Message for the "settings changed" banner shown when a reload
40-
* is required for frame timings in the Performance panel.
41-
*/
42-
reloadRequiredForTimelineFramesMessage:
43-
'Frame timings and screenshots are now available in the Performance panel. Please reload to enable.',
4438
/**
4539
* @description Detail message shown when a feature is disabled due to multiple React Native hosts.
4640
*/
@@ -87,8 +81,7 @@ export class FuseboxFeatureObserver implements
8781
#handleMetadataUpdated(
8882
event: Common.EventTarget.EventTargetEvent<Protocol.ReactNativeApplication.MetadataUpdatedEvent>): void {
8983
// eslint-disable-next-line @typescript-eslint/naming-convention
90-
const {unstable_isProfilingBuild, unstable_networkInspectionEnabled, unstable_frameRecordingEnabled, unstable_networkThrottlingEnabled} =
91-
event.data;
84+
const {unstable_isProfilingBuild, unstable_networkInspectionEnabled, unstable_networkThrottlingEnabled} = event.data;
9285

9386
if (unstable_isProfilingBuild) {
9487
FuseboxWindowTitleManager.instance().setSuffix('[PROFILING]');
@@ -101,10 +94,6 @@ export class FuseboxFeatureObserver implements
10194
this.#hideNetworkPanel();
10295
}
10396

104-
if (unstable_frameRecordingEnabled) {
105-
void this.#ensureTimelineFramesEnabled();
106-
}
107-
10897
if (unstable_networkThrottlingEnabled) {
10998
void this.#ensureNetworkThrottlingEnabled();
11099
}
@@ -153,14 +142,6 @@ export class FuseboxFeatureObserver implements
153142
});
154143
}
155144

156-
async #ensureTimelineFramesEnabled(): Promise<void> {
157-
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES)) {
158-
Root.Runtime.experiments.setEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES, true);
159-
UI.InspectorView?.InspectorView?.instance()?.displayReloadRequiredWarning(
160-
i18nString(UIStrings.reloadRequiredForTimelineFramesMessage));
161-
}
162-
}
163-
164145
async #ensureNetworkThrottlingEnabled(): Promise<void> {
165146
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_THROTTLING)) {
166147
Root.Runtime.experiments.setEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_THROTTLING, true);

‎front_end/global_typings/react_native.d.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ declare global {
1616
// eslint-disable-next-line no-var
1717
var enableDisplayingFullDisconnectedReason: boolean|undefined;
1818
// eslint-disable-next-line no-var
19-
var enableTimelineFrames: boolean|undefined;
20-
// eslint-disable-next-line no-var
2119
var reactNativeOpenInEditorButtonImage: string|undefined;
2220
// eslint-disable-next-line no-var,@typescript-eslint/naming-convention
2321
var FB_ONLY__reactNativeFeedbackLink: string|undefined;

‎front_end/panels/timeline/TimelineFlameChartDataProvider.ts‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
106106

107107
export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
108108
PerfUI.FlameChart.FlameChartDataProvider {
109-
private isReactNative = false;
110-
111109
private droppedFramePatternCanvas: HTMLCanvasElement;
112110
private partialFramePatternCanvas: HTMLCanvasElement;
113111
private timelineDataInternal: PerfUI.FlameChart.FlameChartTimelineData|null = null;
@@ -145,11 +143,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
145143
constructor() {
146144
super();
147145

148-
// [RN] Used to scope down available features for React Native targets
149-
this.isReactNative = Root.Runtime.experiments.isEnabled(
150-
Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,
151-
);
152-
153146
this.reset();
154147

155148
this.droppedFramePatternCanvas = document.createElement('canvas');
@@ -615,9 +608,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
615608
// In CPU Profiles the trace data will not have frames nor
616609
// screenshots, so we can keep this call as it will be a no-op in
617610
// these cases.
618-
if (Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES) || !this.isReactNative) {
619-
this.#appendFramesAndScreenshotsTrack();
620-
}
611+
this.#appendFramesAndScreenshotsTrack();
621612

622613
const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => {
623614
switch (track.appenderName) {

‎front_end/panels/timeline/TimelinePanel.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
539539
this.captureSelectorStatsSetting.setTitle(i18nString(UIStrings.enableSelectorStats));
540540

541541
this.showScreenshotsSetting =
542-
Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', isNode || isReactNative ? false : true);
542+
Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', isNode ? false : true);
543543
this.showScreenshotsSetting.setTitle(i18nString(UIStrings.screenshots));
544544
this.showScreenshotsSetting.addChangeListener(this.updateMiniMap, this);
545545

@@ -1189,7 +1189,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
11891189

11901190
// View
11911191
this.panelToolbar.appendSeparator();
1192-
if (!isNode && (Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES) || !isReactNative)) {
1192+
if (!isNode) {
11931193
this.showScreenshotsToolbarCheckbox =
11941194
this.createSettingCheckbox(this.showScreenshotsSetting, i18nString(UIStrings.captureScreenshots));
11951195
this.panelToolbar.appendToolbarItem(this.showScreenshotsToolbarCheckbox);

‎front_end/testing/EnvironmentHelpers.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ const REGISTERED_EXPERIMENTS = [
130130
Root.Runtime.ExperimentName.TIMELINE_ALTERNATIVE_NAVIGATION,
131131
Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,
132132
Root.Runtime.ExperimentName.NOT_REACT_NATIVE_SPECIFIC_UI,
133-
Root.Runtime.ExperimentName.ENABLE_TIMELINE_FRAMES,
134133
Root.Runtime.ExperimentName.ENABLE_NETWORK_THROTTLING,
135134
];
136135

0 commit comments

Comments
 (0)