-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Perf] Use IConfigurationChangeEvent#affectsConfiguration
#169806
Comments
|
@lramos15 makes sense but you could debounce it and merge the listening since you being called repeated during startup |
Noticed the configuration listener in editor to be quite expensive, blocking startup: Refs:
|
[Perf] Use IConfigurationChangeEvent#affectsConfiguration (#169806)
Ping to remaining owners @sbatten @hediet @chrmarti @meganrogge |
Noticed a few more, because |
related #168639
The configuration service encapsulates all our configuration settings (~750 keys) and its event fires whenever any of them change. Naturally this service has many listener. This combination means all listeners should be conservative and avoid unnecessary work, e.g a listener that's interested in the
foo.bar
setting shouldn't do something when thebazz.bazz
setting changes. For that theIConfigurationChangeEvent#affectsConfiguration
-util exists. It allows to quickly check if an event affects "your" setting, this is a good sample of being conservative.The following list (is hopefully complete) and all listeners that unconditionally do work when any configuration changes. This is wasteful and esp hurtful during startup (when all settings are registered)
src/vs/platform/list/browser/listService.ts @joaomoreno
src/vs/platform/quickinput/browser/commandsQuickAccess.ts @bpasero
src/vs/platform/request/node/requestService.ts @sandy081
src/vs/platform/telemetry/common/telemetryService.ts @lramos15
src/vs/platform/telemetry/common/telemetryUtils.ts @lramos15
src/vs/platform/windows/electron-main/windowImpl.ts @chrmarti @sbatten
src/vs/workbench/browser/layout.ts @sbatten
src/vs/workbench/browser/workbench.ts @bpasero
src/vs/workbench/common/editor/editorGroupModel.ts @bpasero
src/vs/workbench/contrib/localHistory/browser/localHistoryTimeline.ts @bpasero
src/vs/workbench/contrib/markers/browser/markersFileDecorations.ts @sandy081
src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.ts @hediet
src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.ts @hediet
68, 29: configurationService.onDidChangeConfiguration,
73, 29: configurationService.onDidChangeConfiguration,
src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts @hediet
src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.ts @hediet
src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts @bpasero
src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts @meganrogge
src/vs/workbench/contrib/testing/browser/testingExplorerView.ts @connor4312
575, 39: configurationService.onDidChangeConfiguration(() => {
src/vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart.ts @bhavyaus
src/vs/workbench/services/editor/browser/editorService.ts @bpasero
The text was updated successfully, but these errors were encountered: