Use ChannelFutureListener in Netty code to reduce capturing lambdas#112967
Use ChannelFutureListener in Netty code to reduce capturing lambdas#112967original-brownbear merged 3 commits intoelastic:mainfrom original-brownbear:capture-less-netty-listeners
Conversation
Mainly motivated by simplifying the reference chains for Netty buffers and have easier to analyze heap dumps in some spots but also a small performance win in and of itself.
|
Pinging @elastic/es-distributed (Team:Distributed) |
DaveCTurner
left a comment
There was a problem hiding this comment.
LGTM but I fear we'll keep making this mistake. Could we forbid the overly-generic io.netty.channel.ChannelFuture#addListener and add something to Netty4Utils to force the type to be ChannelFutureListener?
|
Thanks for taking a look!
You mean completely forbidding |
|
Yeah that's what I mean, I'd prefer that to those over-subtle casts. |
|
@DaveCTurner alrighty done with the forbidden APIs :) |
|
Thanks David! |
…112967) Mainly motivated by simplifying the reference chains for Netty buffers and have easier to analyze heap dumps in some spots but also a small performance win in and of itself.
…lastic#112967) Mainly motivated by simplifying the reference chains for Netty buffers and have easier to analyze heap dumps in some spots but also a small performance win in and of itself.
Mainly motivated by simplifying the reference chains for Netty buffers and have easier to analyze heap dumps in some spots but also a small performance win in and of itself.