netty5/common/src/main
Nick Hill 0280bd2063 Avoid CancellationException construction in DefaultPromise (#9534)
Motivation

problem with Throwable#addSuppressed() raised in #9151. This introduced
a performance issue when promises are cancelled at a high frequency due
to the construction cost of CancellationException at the time that
DefaultPromise#cancel() is called.

Modifications

- Reinstate the prior static CANCELLATION_CAUSE_HOLDER but use it just
as a sentinel to indicate cancellation, constructing a new
CancellationException only if/when one needs to be explicitly
returned/thrown
- Subclass CancellationException, overriding fillInStackTrace() to
minimize the construction cost in these cases

Result

Promises are much cheaper to cancel. Fixes #9522.
2019-09-05 11:10:55 +02:00
..
java/io/netty/util Avoid CancellationException construction in DefaultPromise (#9534) 2019-09-05 11:10:55 +02:00
resources/META-INF/native-image/io.netty/common Update GraalVM Native Image configuration. (#9515) 2019-08-30 09:21:33 +02:00
script Make IntObjectHashMap extend Map 2015-07-22 15:52:27 -07:00
templates/io/netty/util/collection Support removal using values iterator. (#8866) 2019-02-26 21:29:07 +01:00