Skip to content
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

Why does this extension always activate? #228

Closed
TylerLeonhardt opened this issue Jul 6, 2022 · 3 comments
Closed

Why does this extension always activate? #228

TylerLeonhardt opened this issue Jul 6, 2022 · 3 comments
Labels
question Further information is requested

Comments

@TylerLeonhardt
Copy link
Member

can you tell me why this extension needs to be activated for:

  • onStartupFinished
  • onLanguage:yaml
  • onLanguage:html

From my perspective, this extension isn't going to be used all the time to warrant these events and an extension activating when it shouldn't need to ends up annoying customers and impacts performance.

@ashishchoudhary001
Copy link
Contributor

Hey Tyler,
Thanks for pointing this out.
The onLanguage activation events are required by our extension since we support custom AutoComplete in yaml and html files (this autocomplete does not interfere with the language's default autocomplete).
I am not very sure about the 'onStartupFinished' event. I will check with the team and will update about it.

@tehcrashxor @davidjenni can you please answer about why do we need 'onStartupFinished' event.

@TylerLeonhardt
Copy link
Member Author

since we support custom AutoComplete in yaml and html files

Does this apply to all YAML & HTML files or is there a common file name for Power Portal files where the workspaceContains activation event would be more accurate?

@davidjenni
Copy link
Member

@TylerLeonhardt isn't the onStartupFinished activation off the critical path, i.e. vscode calls it delayed? Our activate event handler mostly just does setup subscriptions to hook into the host's events.

The one potentially expensive work is unzipping a .nupkg with our pac CLI; but that extra work only happens if a newer .vsix also contains a newer version of our .nupkg. In startups after that, it should be cheaper.
The onLanguage hooks are as @ashishchoudhary001 already elaborated; I suppose that part could switch to workspaceContains?

Since you're on the vscode team, I'd be happy to have a conversation via corporate Teams, pls add @tehcrashxor, @ashishchoudhary001 (in IST timezon) and myself to that convo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants