-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Event.defer with hidden experimental setting
Part of #161622
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/vs/workbench/contrib/performance/browser/inputLatency.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { Event } from 'vs/base/common/event'; | ||
import { Disposable } from 'vs/base/common/lifecycle'; | ||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; | ||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; | ||
|
||
export class InputLatencyContrib extends Disposable implements IWorkbenchContribution { | ||
constructor( | ||
@IConfigurationService private readonly _configurationService: IConfigurationService | ||
) { | ||
super(); | ||
this._register(_configurationService.onDidChangeConfiguration(() => this._refresh())); | ||
this._refresh(); | ||
} | ||
|
||
private _refresh() { | ||
const value = this._configurationService.getValue<boolean>('performance.inputLatency') || false; | ||
if (Event.enableDefer !== value) { | ||
console.warn('Event.enableDefer = ', value); | ||
Event.enableDefer = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters