Skip to content

Project dependencies route spawns dozens of slow cmd.exe processes #4895

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

Closed
richardtallent opened this issue Nov 27, 2019 · 3 comments · Fixed by #5045
Closed

Project dependencies route spawns dozens of slow cmd.exe processes #4895

richardtallent opened this issue Nov 27, 2019 · 3 comments · Fixed by #5045

Comments

@richardtallent
Copy link

richardtallent commented Nov 27, 2019

Version

4.0.5

Environment info

 System:
   OS: Windows 7
   CPU: (4) x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
 Binaries:
   Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
   Yarn: Not Found
   npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
 npmGlobalPackages:
   @vue/cli: Not Found

Steps to reproduce

Open any project in Vue UI. Go to the dependencies tab. Look at Windows Task Manager and note how many cmd.exe processes are spawned and how slowly they resolve with version information.

What is expected?

If shelling out is needed to get versions, batching the requests somehow might improve performance significantly

What is actually happening?

It appears a new cmd process is created for each dependency and plugin


I don't recall this being slow in v3, but now it's slow enough that I try to avoid that tab and just use npm outdated from the command line.

@LinusBorg
Copy link
Member

I'd apprechiate you editing your issue removing the unnecessary snark. :)

@LinusBorg LinusBorg added scope: ui needs team repro We acknowledged your report and will soon try to reproduce it labels Nov 28, 2019
@richardtallent
Copy link
Author

Updated! Apologies, the mild humor was with the intention of keeping it light rather than just filing another boring complaint. :)

The same spawning of lots of node processes to check dependency versions happens on my Mac too, but it's done in a second or two, not 2-5 minutes. The Mac is newer and faster than my day-job-corporate-Dell, but not orders of magnitude faster. They're on the same network (I work remotely), so it doesn't appear to be a network issue.

@haoqunjiang
Copy link
Member

Got it. It's because in v4 package metadata are achieved calling the npm info command.

https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli/lib/util/ProjectPackageManager.js#L177-L198

Could be fixed by replacing it with a normal HTTP request.

@haoqunjiang haoqunjiang added bug contribution welcome and removed needs team repro We acknowledged your report and will soon try to reproduce it labels Nov 29, 2019
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Jan 7, 2020
pksunkara pushed a commit that referenced this issue Jan 13, 2020
* refactor: use a plain http request to get package metadata

fixes #4895
fixes #4995

* chore: add link to the package metadata documentation
mactanxin pushed a commit to mactanxin/vue-cli that referenced this issue Feb 11, 2020
* refactor: use a plain http request to get package metadata

fixes vuejs#4895
fixes vuejs#4995

* chore: add link to the package metadata documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants