All implementations AsynchronousByteChannelin Java 8 allocate additional objects for each channel read / write operation. This looks strange to me, because this API was intended ( *) for use in high-performance applications, and allocating additional objects on the hot run path does not correspond to the best practices for such applications. Are there alternative implementations that can provide good network I / O performance without distribution?
Note. One of the reasons I planned to use NIO2 is Iocp support for Windows. NIO from Java 1.4 does not use it.
* Well, I don’t know the original intentions for this API, but I assume that the “normal” applications are fully satisfied with the regular IO locking APIs and that NIO / AIO is simply not needed.
source
share