snyk / nodejs-lockfile-parser

Generate a Snyk dependency tree from package-lock.json or yarn.lock file
Other
60 stars 28 forks source link

feat: replace for loop with Promise.all for ~1 min improvement in some cases #53

Closed lili2311 closed 4 years ago

lili2311 commented 4 years ago

What this does

Some projects with dense dependencies will see 1 min shaved off snyk test --dev

Tested 1897 dependencies for known issues, found 122 issues, 21409 vulnerable paths.

before

real    3m38.727s
user    1m15.105s
sys 0m7.165s

after with promise.all()

real    2m32.861s
user    1m12.167s
sys 0m5.526s

after with pMap 😱

real    0m52.625s
user    0m45.793s
sys 0m2.508s

More information

snyksec commented 4 years ago

:tada: This PR is included in version 1.17.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: