3 ms·
Promise.all waits for all 50 promises to resolve, so if one of these promises takes 3s, while the other 49 are taking 0.5s, you're waisting 2.5s awaiting each b
by whilenot-dev 1y ago
Promise.all waits for all 50 promises to resolve, so if one of these promises takes 3s, while the other 49 are taking 0.5s, you're waisting 2.5s awaiting each batch.
The implementation is rather simple, but more than 3 LoC: https://github.com/whilenot-dev/promises-batched/blob/main/src/promiseAllBatched.ts https://github.com/whilenot-dev/promises-batched/blob/main/s...
- winrid 1y agoI know. My point is you can do better without a library.
- halfmatthalfcat 1y agoWhy not write all of our applications on one file? Why bother using (language specific) modules? To take your argument to the logical extreme, DRY is a fanatical doomsday computer science cult.