Skip to content

add DirectByteString: a ByteString implementation that uses an off-heap ByteBuffer as backing #2145

@pjfanning

Description

@pjfanning

The Pekko ByteString uses a byte array as backing.
Netty has support for DirectByteBufs (ByteBufs that use an off-heap ByteBuffer - aka Direct ByteBuffer).

pekko-actor already has DirectByteBufferPool - so in theory, we can reuse the direct ByteBuffers too.

ByteStrings (a ByteString that is a concat of multiple ByteStrings) should hopefully be able to work with DirectByteStrings with little or no changes.

When ByteStrings are compacted, we might want to be able to choose if the compacted ByteString is byte array backed or Direct ByteBuffer backed.

wdyt @He-Pin ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions