You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by NicoK <gi...@git.apache.org> on 2017/08/11 15:57:47 UTC

[GitHub] flink issue #4529: [FLINK-7428][network] avoid buffer copies when receiving ...

Github user NicoK commented on the issue:

    https://github.com/apache/flink/pull/4529
  
    FYI:
    - newer netty 4.0.xx versions also use `buffer.slice(index, length)` inside their `extractFrame()` method (see https://github.com/netty/netty/commit/891be30a28c6dc5a1edf1cb5a3690644cf4ff66e) and despite the comment on `extractFrame()`, this is also safe when used outside the `decode()` method as long as the buffer is retained (and then released later). By letting `NettyMessageDecoder` inherit from `LengthFieldBasedFrameDecoder` though, we also gain a smaller channel handler pipeline.
    - netty 4.1 offers an even improved `buffer.retainedSlice(index, length)` implementation (see https://github.com/netty/netty/commit/3a9f47216143082bdfba62e8940160856767d672) but we can't go that way yet due to our netty-router dependency


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---