Should built-in extensions use "onStartupFinished" activation event?
Closed this issue ยท 9 comments
onStartupFinished
This activation event is emitted and interested extensions will be activated some time after VS Code starts up. This is similar to the
*
activation event, but it will not slow down VS Code startup.
Extension | Eager | Load Code | Call Activate | Finish Activate | Event | By |
---|---|---|---|---|---|---|
vscode.debug-auto-launch | true | 2 | 0 | 23 | * | vscode.debug-auto-launch |
vscode.emmet | true | 8 | 2 | 21 | * | vscode.emmet |
vscode.git | true | 11 | 5 | 57 | * | vscode.github |
vscode.github | true | 4 | 0 | 0 | * | vscode.github |
vscode.merge-conflict | true | 2 | 1 | 15 | * | vscode.merge-conflict |
vscode.search-result | true | 2 | 1 | 14 | * | vscode.search-result |
I leave this to the respective owners to decide. There are many use-cases with these extensions, and I am not familiar with all of them. So I cannot say for sure what the impact would be if they would be activated after the startup.
The ask is to evaluate if you would like to switch to onStartupFinished
from *
.
- vscode.debug-auto-launch @weinand @connor4312
- vscode.emmet @rzhao271
- vscode.git @joaomoreno
- vscode.github @joaomoreno
- vscode.merge-conflict @chrmarti
- vscode.search-result @JacksonKearl
@connor4312 I'm fine with starting vscode.debug-auto-launch
"onStartupFinished" instead of "*". Is this OK for you too? If yes, please check off the item above.
I'd prefer Emmet to remain with '*' as the activation event, because if it's enabled, and an Emmet user opens an HTML file, I assume they want Emmet suggestions to show up ASAP.
There is already a delay as the extensions activate, and I notice it while using Emmet.
One thing we do want for auto launch is for it to start before any the user runs tasks or other things in the terminal, since before that the debug server will not be stood up and auto attach will no-op. Even with *
I sometimes have attachment not kick in when I start node too fast. So I'm not sure about moving that to onStartupFinished
and delaying it longer.
@rzhao271 maybe onLanguage:html
is the most appropriate event to use? That will activate as soon as it's opened, and if the user doesn't open an .html file it won't activate at all.
Git and Github already get a lot of slack for taking long to start working, so I don't think it's a great idea to delay them even further.
Updated Emmet to use onStartupFinished instead of *
cc @chrmarti for the last โ
(I believe @connor4312 has explicitly opted in to *
)
Using onStartupFinished for merge conflicts. The only downside is that when a merge conflict is visible early (e.g., when an editor with a merge conflict is restored on startup) that merge conflict will be decorated with more delay than before. That seems a small price considering how rare this must be.
Closing as I'm ticking the last box.