Observation: Project Reactor Flux.parallel().runOn() is used. Problem: The data is divided on a number of 'rails' matching the number of CPU cores.
This is only useful in case much CPU processing is performed: if the sequential form takes more than 0,1 ms of CPU time.
With remote calls this is usually not the case. In addition, it introduces more complexity with risk of failures. Solution: Remove parallel().runOn. For pure CPU processing: use ordinary sequential streaming unless the work takes more than about 0,1 ms in sequential form and proves to be faster with parallelization.
So only for large collections and much processing.
Observation: Project Reactor Flux.parallel().runOn() is used.
Problem: The data is divided on a number of 'rails' matching the number of CPU cores. This is only useful in case much CPU processing is performed: if the sequential form takes more than 0,1 ms of CPU time. With remote calls this is usually not the case. In addition, it introduces more complexity with risk of failures.
Solution: Remove parallel().runOn. For pure CPU processing: use ordinary sequential streaming unless the work takes more than about 0,1 ms in sequential form and proves to be faster with parallelization. So only for large collections and much processing.