Replies: 1 comment
-
I suppose I could use byte buffer in the background and add another getter. But are you entirely sure about performance? There has been a lot written about this that seems to suggest there isn't as much benefit without a pool and to add the pool in would require quite a bit of effort. The NIO stuff would require a major rewrite. |
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
-
Can I ask why you don't use Java NIO and Pools of Direct Byte Buffers? As far as I know, it will be clearly faster than Java IO and heap arrays. I've seen a commit that used heap byte buffers instead of an array, and, overall, it's not surprising that it lost out on performance. If you pay attention to this, it would be nice to return a byte buffer itself instead of an array of bytes in Message#data. It would also be interesting to look towards Java 21 FFM with Memory Segments.
Beta Was this translation helpful? Give feedback.
All reactions