Skip to content

Skip checking install requests for known extensions #2288

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nagilson
Copy link
Member

We check the package.json file for each extension which is an expensive wholistic file read that happens async during startup. This is slow and we can skip that for many extensions that we know will never need to ask us to install or find dotnet.

What I did to generate this list:

  • Look at the extensions.all output on an empty (no custom extensions) code
  • Look at the marketplace and add all first party / business partner related extensions I saw on the page that had the highest number of downloads

This is not an endorsement of these extensions or their codebases.
There is not a way to filter these or get anything besides .all of the extensions at this time.

cc @adrianvmsft @JakeRadMSFT @lifengl

nagilson added 2 commits May 22, 2025 16:29
not sure what will go in the release so some change log information is out of date
We check the package.json file for each extension which is an expensive wholistic file read that happens async during startup. This is slow and we can skip that for many extensions that we know will never need to ask us to install or find dotnet.

What I did to generate this list:
- Look at the extensions.all output on an empty (no custom extensions) code
- Look at the marketplace and add all first party / business partner related extensions I saw on the page that had the highest number of downloads

This is not an endorsement of these extensions or their codebases.
There is not a way to filter these or get anything besides .all of the extensions at this time.
@nagilson
Copy link
Member Author

Can we use an O(1) structure? Is that worth the memory cost and upkeep of a const size, small size container? Probably not

@nagilson
Copy link
Member Author

Set is indeed implemented typically using an o(1) data structure such as a hashtable in JS based on my research. So, it may be slightly memory intensive, but considering we do the operation a great number of times, it's likely worth this cost. Can run through with the perf review team.

@nagilson nagilson requested a review from a team May 27, 2025 22:57
@@ -13,6 +13,131 @@ import { IJsonInstaller } from "./IJsonInstaller";

export class JsonInstaller extends IJsonInstaller
{
private readonly knownCommonExtensionIdsNotUsingDotnet: Set<string> = new Set<string>([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to do this the other way around?
That may need to have a way to specify additional extensions locally.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, do you mean inclusive instead of exclusive? I think that's a good idea, but I worry it would harm the adoption/usefulness of our API by only allowlisting certain extensions to use it. Worst case, I could see that coming up in an anti-competitive practice lawsuit, which concerns me.

Now, maybe we could add some other way for extensions to specify they want us to do something. However, this needs to be done at activation before other extensions can run. We could ask them to ship with an additional manifest file, perhaps... though I'm not sure if we would be privy to that logic, and that risks things like protected files / bad read access, so I think I prefer this approach. Thanks for taking a look 👀

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

Successfully merging this pull request may close these issues.

3 participants