Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-15067

All RESP handlers should use ASCII string whenever possible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 15.0.0.Final
    • None
    • RESP
    • 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.

            wburns@redhat.com Will Burns
            wburns@redhat.com Will Burns
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: