Promise.all is too much of a good thing
Sometimes, your application architecture or constraints force you to do a bunch of database lookups in rapid succession.
Running them sequentially, one after another, can take a long time. With great new syntax in Javascript,
like async
and await
, running multiple operations concurrently is easier than ever. By doing so, you can complete a
big operation faster, but you risk shooting yourself in the foot and bringing your entire system to its knees. Good
application performance needs a holistic view: making one operation faster at the expense of all the others is not a
good engineering trade-off.