I’ve found that if I’m using scala.concurrent.Future in my code, I can get some really easy performance gains by just switching to scalaz.concurrent.Task instead, particularly if I’m chaining them with map or flatMap calls, or with for comprehensions.
Jumping into thread pools
Every Future is basically some work that needs to be submitted to a thread pool. When you call futureA.flatMap(a = futureB), both Future[A] and Future[B] need to be submitted to the thread pool, even though they are not...
Published on June 20, 2015 10:26