apache / apache/pekko

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

Open
#2,145 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Scala
Stars
1.6k
Forks
211
Avg merge
1d 6h
Merged PRs (30d)
89

Description

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 ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.