Running JS Promises concurrently - but not too many at once!
Wes Bos · 1:52
Using the p-map npm library to run promises with capped concurrency (at most 6 at a time) made a batch of 100 video-screenshot jobs finish in 19 seconds. Running them all at once with Promise.all took about 33–35 seco...