diff --git a/src/devtools/ProfilerStore.js b/src/devtools/ProfilerStore.js index 9f255fd963..c6d714cb05 100644 --- a/src/devtools/ProfilerStore.js +++ b/src/devtools/ProfilerStore.js @@ -153,12 +153,13 @@ export default class ProfilerStore extends EventEmitter { this._initialSnapshotsByRootID.clear(); this._inProgressOperationsByRootID.clear(); this._inProgressScreenshotsByRootID.clear(); + this._rendererQueue.clear(); // Invalidate suspense cache if profiling data is being (re-)recorded. // Note that we clear now because any existing data is "stale". this._cache.invalidate(); - this.emit('isProfiling'); + this.emit('profilingData'); } startProfiling(): void { diff --git a/src/devtools/views/Profiler/Profiler.js b/src/devtools/views/Profiler/Profiler.js index cd39b39f2f..643aa362ef 100644 --- a/src/devtools/views/Profiler/Profiler.js +++ b/src/devtools/views/Profiler/Profiler.js @@ -63,20 +63,22 @@ function Profiler({ supportsProfiling }: Props) { } let sidebar = null; - switch (selectedTabID) { - case 'interactions': - sidebar = ; - break; - case 'flame-chart': - case 'ranked-chart': - if (selectedFiberID !== null) { - sidebar = ; - } else { - sidebar = ; - } - break; - default: - break; + if (!isProfiling && !isProcessingData && hasProfilingData) { + switch (selectedTabID) { + case 'interactions': + sidebar = ; + break; + case 'flame-chart': + case 'ranked-chart': + if (selectedFiberID !== null) { + sidebar = ; + } else { + sidebar = ; + } + break; + default: + break; + } } return (