Skip to content

Commit

Permalink
enhance: turn of decorators in perf mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinslin committed Jul 6, 2023
1 parent f8a1f94 commit 2d533d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/plugin-core/src/windowWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ export class WindowWatcher {
context.subscriptions
)
);

if (this._extension.getDWorkspace().config.workspace.enablePerfMode) {
Logger.info({
ctx: "WindowWatcher:activate",
msg: "perf mode enabled, not adding onDidChangeTextEditorVisibleRanges",
});
return;
}
this._extension.addDisposable(
window.onDidChangeTextEditorVisibleRanges(
this.onDidChangeTextEditorVisibleRanges,
Expand Down

0 comments on commit 2d533d4

Please sign in to comment.