If possible, please don't activate on `*`
TylerLeonhardt opened this issue · comments
Describe the bug
When you are *
activated, you compete with vscode for start up time and as a result, you hurt vscode's startup time in the process.
It's better to be reactive and only activate when the user interacts with your extension:
- via a command
- via a view being visible
To Reproduce
Steps to reproduce the behavior:
- Go to vscode.dev
- install codetour
- reload the window
- codetour is activated
Expected behavior
It shouldn't activate until needed.
Additional context
The line in the package.json is here:
https://github.com/microsoft/codetour/blob/main/package.json#L34
Activation events for your reference (even though I know you know where these are)
https://code.visualstudio.com/api/references/activation-events
I updated the extension to activate on onStartupFinished
instead, and will release that update to the marketplace this afternoon.
@lostintangent wouldn't it be better to activate when the repo has a codetour json file?
https://code.visualstudio.com/api/references/activation-events#workspaceContains