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

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

joeywatts opened this issue Jan 24, 2020 · 6 comments
Assignees

Comments

@joeywatts
Copy link

@joeywatts joeywatts commented Jan 24, 2020

  • 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 label Jan 24, 2020
@joeywatts

This comment has been minimized.

Copy link
Author

@joeywatts 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

This comment has been minimized.

Copy link
Contributor

@gjsjohnmurray gjsjohnmurray commented Jan 24, 2020

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

@joeywatts

This comment has been minimized.

Copy link
Author

@joeywatts joeywatts commented Jan 24, 2020

@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

This comment has been minimized.

Copy link
Author

@joeywatts joeywatts commented Jan 26, 2020

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

This comment has been minimized.

Copy link
Member

@sandy081 sandy081 commented Jan 27, 2020

/duplicate

#77201

@vscodebot vscodebot bot added the *duplicate label Jan 27, 2020
@vscodebot

This comment has been minimized.

Copy link

@vscodebot 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 Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.