tag:blogger.com,1999:blog-6026073423954662509.post5372903983599161147..comments2023-04-05T16:46:09.400+02:00Comments on Xavier Padró's Blog: Improving performance: non-blocking processing of streamsAnonymoushttp://www.blogger.com/profile/05830415740156192526noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6026073423954662509.post-35610360851843536192015-05-24T10:54:07.112+02:002015-05-24T10:54:07.112+02:00It is not about using parallel streams, which use ...It is not about using parallel streams, which use the Fork/Join framework. It is about using CompletableFuture with streams to send requests asynchronously. If not, you will have maybe four threads blocked waiting for the service to respond while the CPU is idle.Anonymoushttps://www.blogger.com/profile/05830415740156192526noreply@blogger.comtag:blogger.com,1999:blog-6026073423954662509.post-42002380224198077522015-05-16T02:12:04.326+02:002015-05-16T02:12:04.326+02:00Wrong conclusion, you didn't do async requests...Wrong conclusion, you didn't do async requests, you have created 100 threads and blocked 20 of them. So you actually don't need to do some sort of that "magic", you can just increase the size of fork-join pool that is used by default for stream processing from 8 to 20 and you will get the same results.<br />async (and non blocking) IO is an option of OS and drivers, not your "behavior" implementation.Anonymousnoreply@blogger.com