-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Stats show that a huge portion of extension restarts are "configurationChange". Which indicates that one of the following settings changed:
Dart-Code/src/extension/extension.ts
Lines 837 to 863 in 35dfe98
| function getSettingsThatRequireRestart() { | |
| // The return value here is used to detect when any config option changes that requires a project reload. | |
| // It doesn't matter how these are combined; it just gets called on every config change and compared. | |
| // Usually these are options that affect the analyzer and need a reload, but config options used at | |
| // activation time will also need to be included. | |
| return "CONF-" | |
| + config.sdkPath | |
| + config.sdkPaths?.length | |
| + config.analyzerPath | |
| + config.analyzerDiagnosticsPort | |
| + config.analyzerVmServicePort | |
| + config.analyzerInstrumentationLogFile | |
| + config.extensionLogFile | |
| + config.analyzerAdditionalArgs?.join(",") | |
| + config.analyzerVmAdditionalArgs?.join(",") | |
| + config.flutterSdkPath | |
| + config.flutterSdkPaths?.length | |
| + config.flutterSelectDeviceWhenConnected | |
| + config.closingLabels | |
| + config.analyzeAngularTemplates | |
| + config.analysisServerFolding | |
| + config.showMainCodeLens | |
| + config.showTestCodeLens | |
| + config.updateImportsOnRename | |
| + config.flutterOutline | |
| + config.flutterAdbConnectOnChromeOs; | |
| } |
Some of the logs I've seen recently made me wonder whether this was firing during startup (and this could perhaps explain some very short analyzer sessions), but I can't come up with a reason why this would fire automatically (maybe settings sync?).
It could be worth trying to trim this list right down (for example things like CodeLens could just be handled in the provider with onDidChangeCodeLensesEmitter), and then what's left could be appended to the reason string so we can see if there is a pattern to what's happening most common.
It's very possible that the use is legit (for example switching SDKs frequently, as I do), but since it could explain some of the short analyzer sessions, it's worth some investigation.