-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Many places are using ByteBufferUtils.stringToByteBuf which works fine. However, it takes the worse case assumption that the String can contain UTF-8 characters. We have tried to limit the cost of UTF-8 encoding but it is still extremely high compared to ASCII encoding. We should make sure we are doing ASCII encoding in these places instead.
From async profiler and a pooled ByteBuffer the UTF-8 encoding is almost 3x the cost of writing the bytes to the buffer. An extreme case is the Consumers.GET_BICONSUMER where it is writing only 5 characters that are always ASCII and is a very critical path for a miss.