Skip to content

Commit bbeea75

Browse files
authored
Debounce updating notebook debug decorators (microsoft#210010)
Debounce updating notebook debug decotrators
1 parent e079f1e commit bbeea75

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import { Delayer } from 'vs/base/common/async';
67
import { Disposable } from 'vs/base/common/lifecycle';
78
import { IRange, Range } from 'vs/editor/common/core/range';
89
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@@ -34,11 +35,12 @@ export class PausedCellDecorationContribution extends Disposable implements INot
3435
) {
3536
super();
3637

38+
const delayer = this._register(new Delayer(200));
3739
this._register(_debugService.getModel().onDidChangeCallStack(() => this.updateExecutionDecorations()));
3840
this._register(_debugService.getViewModel().onDidFocusStackFrame(() => this.updateExecutionDecorations()));
3941
this._register(_notebookExecutionStateService.onDidChangeExecution(e => {
4042
if (e.type === NotebookExecutionType.cell && this._notebookEditor.textModel && e.affectsNotebook(this._notebookEditor.textModel.uri)) {
41-
this.updateExecutionDecorations();
43+
delayer.trigger(() => this.updateExecutionDecorations());
4244
}
4345
}));
4446
}

0 commit comments

Comments
 (0)