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

Minimize number of extension query requests to Marketplace #139015

Closed
sandy081 opened this issue Dec 13, 2021 · 4 comments
Closed

Minimize number of extension query requests to Marketplace #139015

sandy081 opened this issue Dec 13, 2021 · 4 comments
Assignees
Labels
debt Code quality issues extensions Issues concerning extensions feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Milestone

Comments

@sandy081
Copy link
Member

Minimize number of extension query requests to Marketplace

  • At present, one request is made per each installed extension when the latest version of that extension in the marketplace is not compatible. Change it to one request for all such extensions.

  • At present, an additional request is made to know if there is a release version or not even when requested for pre-release version. This is to support the feature - not to show install release version button or not to show switch to release version button - Pre-Release only extensions show up in Stable search results #138231. Since this adds additional overhead on MP, lets unsupport this feature and support it when MP moves to SemVer with proper efficient query API.

@sandy081 sandy081 added debt Code quality issues extensions Issues concerning extensions labels Dec 13, 2021
@sandy081 sandy081 added this to the January 2022 milestone Dec 13, 2021
@sandy081 sandy081 self-assigned this Dec 13, 2021
@sandy081 sandy081 added the feature-request Request for new features or functionality label Jan 17, 2022
@sandy081
Copy link
Member Author

sandy081 commented Jan 17, 2022

Improvements:

  • Refactored ExtensionsGalleryService to funnel all workbench Marketplace queries into single queryGalleryExtensions method which can serve all purposes (compatible, target platform, version, pre-release...)
  • let workbench make single request (max 2 queries) to query all latest compatible installed extensions while checking for updates. Before there can be more requests if the latest versions are not compatible.
  • With introduction of pre-release feature, VS Code added an additional request every time a pre-release extension is found in the query result. This request is to check if the pre-release extension has a release version or not and show the UI (like Install/Switch to Release Version buttons) accordingly. Added a change to remove this additional request completely in VS Code Insiders and also avoids this additional request while fetching updates in both VS Code insiders and stable. NOTE: If in case extension does not have a release version, UI remains same but users will see following error when installing the release version.
    image

sandy081 added a commit that referenced this issue Jan 17, 2022
- unify querying capability
- get all compatible installed extensions for update in a single query request
sandy081 added a commit that referenced this issue Jan 17, 2022
- unify apis in IExtensionGalleryService
sandy081 added a commit that referenced this issue Jan 17, 2022
- avoids additional request to check if extension has release version
- improve error handling when release version is not found
@sandy081
Copy link
Member Author

cc @SaiKanth007

sandy081 added a commit that referenced this issue Jan 22, 2022
sandy081 added a commit that referenced this issue Jan 22, 2022
- use getExtensions for querying by id or name
- introduce getExtensions in IExtensionsWorkbenchService
@SaiKanth007
Copy link

SaiKanth007 commented Jan 25, 2022

I also remember we discussed that having two instances of VSCode editors open will make two different update calls to marketplace, even that is optimized as part of this ?

Is Featured Extension call also included in the above mentioned 2 calls or is it different ?

@sandy081
Copy link
Member Author

I also remember we discussed that having two instances of VSCode editors open will make two different update calls to marketplace, even that is optimized as part of this ?

No, that needs considerable design changes and felt not worth the change. Current optimizations listed above are already good enough.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues extensions Issues concerning extensions feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Projects
None yet
Development

No branches or pull requests

3 participants
@sandy081 @SaiKanth007 and others