midwayjs / midway-faas

🔱 A simple and lightweight serverless framework
MIT License
390 stars 40 forks source link

安装过程需要88s,优化 #84

Closed stone-jin closed 4 years ago

stone-jin commented 4 years ago

npm i -g @midwayjs/faas-cli --registry=https://registry.npm.taobao.org

耗费88s

+ @midwayjs/faas-cli@0.2.49
added 1556 packages from 1496 contributors in 88.201s
waitingsong commented 4 years ago
time npm i -g @midwayjs/faas-cli --registry=https://registry.npm.taobao.org --loglevel info

added 1541 packages from 1486 contributors in 81.05s

real    1m25.524s
user    0m0.015s
sys     0m0.182s

是比较慢(先执行了一次,中途退出,有部分的本地cache)

echosoar commented 4 years ago

image

可以看出来最大的依赖是:@alicloud/fun、midway-bin(egg-bin),把这两个移除掉依赖就会少很多

echosoar commented 4 years ago

use taobao npm

npm i -g @midwayjs/faas-cli --registry=https://registry.npm.taobao.org

@midwayjs/faas-cli@0.2.88

added 1709 packages from 1555 contributors in 81.183s 394M node_modules

@midwayjs/faas-cli@0.2.90

remove midway-bin

added 875 packages from 1039 contributors in 51.884s (-37%) 238M node_modules (-40%)