-
Notifications
You must be signed in to change notification settings - Fork 158
Closed
Description
It seems that doing any npm install -g
is an order of magnitude slower with asdf-nodejs vs. a standard npm install.
My guess is that it is coming from the post install hook the seems to run on every dependency and every nested dependency for global installs. The post install hook seems to invoke bin/get-bin-names.js
for each package, which just parses package.json to find bin files to shim. I'm guessing a big chunk of that time is spent starting up a node process for each package.
I'd suggest we either:
- convert
get-bin-names.js
to a bash script that greps through the package.json to find the bin files (given the narrow acceptable values for thebin
property in a package.json, grepping seems like it might be possible, or - convert
bin/postinstall.sh
to node and consolidating it withbin/get-bin-names.js
, so we can avoid the hit for starting up a node process for each package
Happy to PR the latter approach (the former might stretch my bash-fu skills a bit) if there's any interest.
mareksuscak, alissonsales, Stratus3D, vinnymac, morgoth and 44 more
Metadata
Metadata
Assignees
Labels
No labels