Reset commit tree cache between profiles
Brian Vaughn committed
Mar 16, 2019 at 08:50 UTC
a93dab7f837fe20adc744f819c4d09da4b4191f1
2 files changed
+9
-1
src/devtools/ProfilingCache.js
+5
-1
@@ -2,7 +2,10 @@
2
3
import { createResource, invalidateResources } from './cache';
4
import Store from './store';
5
-import { getCommitTree } from 'src/devtools/views/Profiler/CommitTreeBuilder';
5
+import {
6
+ getCommitTree,
7
+ invalidateCommitTrees,
8
+} from 'src/devtools/views/Profiler/CommitTreeBuilder';
9
10
import type { Resource } from './cache';
11
import type { Bridge } from '../types';
@@ -128,6 +131,7 @@ export default class ProfilingCache {
131
132
invalidate() {
133
invalidateResources();
134
+ invalidateCommitTrees();
135
136
this._pendingCommitDetailsMap.clear();
137
this._pendingProfileSummaryMap.clear();
src/devtools/views/Profiler/CommitTreeBuilder.js
+4
@@ -233,3 +233,7 @@ function updateTree(
233
rootID: commitTree.rootID,
234
};
235
}
236
+
237
+export function invalidateCommitTrees(): void {
238
+ rootToCommitTreeMap.clear();
239
+}