IO has a very different cost than wasting CPU cycles, so shouldn’t necessarily be lumped together when analyzing tradeoffs.
Your point still stands that fundamentally changing the design of code should limited to the hottest parts.
Probably the biggest risk to this style map/reduce code is that you end up having IO deeply nested running synchronously versus grouping operations that can be run in parallel.
Your point still stands that fundamentally changing the design of code should limited to the hottest parts.
Probably the biggest risk to this style map/reduce code is that you end up having IO deeply nested running synchronously versus grouping operations that can be run in parallel.