Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-9867

Save on array copies with a subclass of LiteralByteString

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.96.0
    • 0.98.0, 0.96.1
    • Protobufs
    • None
    • Reviewed

    Description

      Any time we add a byte array to a protobuf, it'll copy the byte array.

      I was playing with the client and noticed how a bunch of CPU and copying was being done just to copy basic arrays doing pb construction. I started to look at ByteString and then remembered a class Benoit sent me a while back that I did not understand from his new AsyncHBase. After looking in ByteString it made now sense. So, rather than copy byte arrays everywhere, do a version of a ByteString that instead wraps the array.

      Attachments

        1. 9867.096.txt
          95 kB
          Michael Stack
        2. 9867v2.txt
          84 kB
          Michael Stack
        3. 9867.txt
          85 kB
          Michael Stack
        4. 9867.txt
          85 kB
          Michael Stack

        Activity

          People

            stack Michael Stack
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: