Skip to content

Commit 2a8f7c5

Browse files
committed
only blame an extension once...
1 parent 5637f24 commit 2a8f7c5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/vs/workbench/parts/extensions/electron-browser/extensionsAutoProfiler.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { IExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/commo
2424
export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchContribution {
2525

2626
private readonly _session = new Map<ICpuProfilerTarget, CancellationTokenSource>();
27+
private readonly _blame = new Set<string>();
2728

2829
constructor(
2930
@IExtensionService private _extensionService: IExtensionService,
@@ -170,6 +171,12 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
170171
return;
171172
}
172173

174+
// only blame once per extension, don't blame too often
175+
if (this._blame.has(extension.id) || this._blame.size >= 3) {
176+
return;
177+
}
178+
this._blame.add(extension.id);
179+
173180
// user-facing message when very bad...
174181
this._notificationService.prompt(
175182
Severity.Info,

0 commit comments

Comments
 (0)