netty5/transport-native-epoll/src
Trustin Lee aa42287e46 Throw exceptions outside the native code
Rebased and cleaned-up based on the work by @normanmaurer

Motivation:

Currently, IOExceptions and ClosedChannelExceptions are thrown from
inside the JNI methods. Instantiation of Java objects inside JNI code is
an expensive operation, needless to say about filling stack trace for
every instantiation of an exception.

Modifications:

Change most JNI methods to return a negative value on failure so that
the exceptions are instantiated outside the native code.

Also, pre-instantiate some commonly-thrown exceptions for better
performance.

Result:

Performance gain
2014-12-30 12:25:23 +09:00
..
main Throw exceptions outside the native code 2014-12-30 12:25:23 +09:00
test/java/io/netty/channel/epoll Remove bottleneck while create InetSocketAddress in native transport 2014-12-12 18:16:23 +01:00