Replies: 2 comments 1 reply
-
At one time I implemented ByteArrayBuilder with both byte[] and ByteBufer. Testing did not demonstrate any real performance difference, and we stuck with ByteBuffer under the covers just because of this type of conversation. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Should it be transferred to the issues section? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use of native transport (Epoll/Kqueue if available, else NIO) would improve performance for the respective platforms.
Use & pool off-heap direct buffers would allow better memory control without creating unnecessary garbage for the GC.
Obviously, (de-)serialization on the API side should also be switched to direct buffers to avoid moving to heap arrays.
The point is that all of this has long been implemented in the fairly user-friendly library Netty. So the question is, why not use Netty?
I read an earlier issue about this, but still. If there is a way to improve performance, why not do it?
Of course, you can use Java NIO and your own object pools (still better than using heap byte arrays), but Netty allows you to create even less garbage at the expense of natives.
#373
Beta Was this translation helpful? Give feedback.
All reactions