Hacker News new | ask | show | jobs
by mantrax5 4424 days ago
No, long parallel requests are great to do concurrently on a single thread. A thread is a computation primitive, you spin off a thread when you want to compute many things at once, not just wait for many things at once.

If you would spin up threads just for this you're wasting memory and slowing down startup time.

And if you would destroy the threads and spin them up again for every batch of API calls, the result may counterintuitively be a slower app due to the overhead of creating the threads themselves.

At the same time concurrency is free. There's no overhead for doing a call async.