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

Installing VSIX extension file from command line is significantly slower #89204

Closed
joeywatts opened this issue Jan 24, 2020 · 6 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) extensions Issues concerning extensions

Comments

@joeywatts
Copy link

  • VSCode Version: 1.41.1
  • OS Version: macOS 10.14.5

Steps to Reproduce:

  1. Run code --install-extension myext.vsix

Installing a 1.7MB VSIX file from the command line takes ~27 seconds using the command line interface, but succeeds instantly when installing via the UI.

Does this issue occur when all extensions are disabled?: N/A

@vscodebot vscodebot bot added the extensions Issues concerning extensions label Jan 24, 2020
@joeywatts
Copy link
Author

joeywatts commented Jan 24, 2020

After some investigation, logs revealed 26.645 seconds pass between querying https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery (the ExtensionGalleryService) and beginning the extraction of the extension when run via the CLI. When run with the UI, only about 100ms passes.

UPDATE: seems to time out on my proxy even though other utilities are able to connect to this URL through the same proxy just fine. 🤔 I'm using tinyproxy and it's not logging any connection when the CLI is attempting to make the request.

@gjsjohnmurray
Copy link
Contributor

Does the info at https://code.visualstudio.com/docs/setup/network help? Maybe add command line parameters to force use of your proxy.

@joeywatts
Copy link
Author

@gjsjohnmurray that seems to claim that the CLI does not support proxies at all, but I can see the code attempting to use my proxy (picks up both the http.proxy in VSCode settings and http(s)_proxy environment variables) with the http(s)-proxy-agent. I confirmed this by setting breakpoints in the code that sets up the request and the proxy agent.

@joeywatts
Copy link
Author

After further investigation, it seems there was something messed up in my proxy configuration! I was specifying "http://localhost:8888" for my proxy and that was working fine for other programs (including npm and making requests with curl), but not VSCode. I noticed that the timeout error said 127.0.0.1, so I tried using "http://127.0.0.1:8888" and was able to reproduce it with curl.

I was able to fix it by modifying my tinyproxy config to add "Listen 127.0.0.1". Not sure why this would matter (since localhost maps to 127.0.0.1 in my /etc/hosts) or how the host seems to get lost in the mix only with VSCode. This also revealed that telemetry seems to cause it to hang after installing the extension (can easily work around this for now by just disabling telemetry).

@sandy081
Copy link
Member

/duplicate

#77201

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 27, 2020
@vscodebot
Copy link

vscodebot bot commented Jan 27, 2020

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jan 27, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) extensions Issues concerning extensions
Projects
None yet
Development

No branches or pull requests

3 participants