netty5/transport-native-epoll
Norman Maurer 7bba4f49cf
Reduce GC produced by native DatagramChannel implementations when in connected mode. (#8806)
Motivation:

In the native code EpollDatagramChannel / KQueueDatagramChannel creates a DatagramSocketAddress object for each received UDP datagram even when in connected mode as it uses the recvfrom(...) / recvmsg(...)  method. Creating these is quite heavy in terms of allocations as internally, char[], String, Inet4Address, InetAddressHolder, InetSocketAddressHolder, InetAddress[], byte[] objects are getting generated when constructing the object. When in connected mode we can just use regular read(...) calls which do not need to allocate all of these.

Modifications:

- When in connected mode use read(...) and NOT recvfrom(..) / readmsg(...) to reduce allocations when possible.
- Adjust tests to ensure read works as expected when in connected mode.

Result:

Less allocations and GC when using native datagram channels in connected mode. Fixes https://github.com/netty/netty/issues/8770.
2019-02-01 10:29:36 +01:00
..
src Reduce GC produced by native DatagramChannel implementations when in connected mode. (#8806) 2019-02-01 10:29:36 +01:00
pom.xml Update to new checkstyle plugin (#8777) (#8780) 2019-01-25 11:58:42 +01:00
README.md Introduce a native transport for linux using epoll ET 2014-02-15 22:44:56 +01:00

Native transport for Linux

See our wiki page.