Chapter 12Lazy Evaluations and Parallel Collections

Responsiveness—that’s one thing that can make or break just about any application. Other factors like business value, ease of use, availability, cost, and resilience, are also important. But responsiveness is at the top—we humans take about 250 milliseconds to cognitively perceive any action; after five seconds any delay begins to feel like eternity. Any effort to lower the response time will directly impact our ability to make customers happy and, in turn, earn their loyalty.

You can make applications responsive in one of two ways. You could run computations faster by using multiple threads—that is, instead of running tasks one after another, run them in parallel. Alternatively, instead of ...

Get Pragmatic Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.