elizarov
07/03/2017, 8:42 AMserializeElement
are so cheap, that overhead of trying to parallelize them just does not worth it. Moreover, serializateElement
is a fully sync (100% CPU consuming), so using coroutines here is not the most cost-effective approach (remember, that coroutines are optimized for tasks that wait most of the time). For parallelization of CPU-consuming operations you’re better of with something like otherResponses.parallelStream().map { ... }.collect(...)