Thanks for your comment. This KIP does not modify ByteBufferSerializer#serialize(), so do we need to clarify this aspect on motivation?
Best, ShunKang Ismael Juma <ism...@juma.me.uk>于2023年4月10日 周一12:37写道: > Hi, > > One interesting aspect is that the current `ByteBufferSerializer` avoids > copies in the following case: > > if (data.hasArray()) { > final byte[] arr = data.array(); > if (data.arrayOffset() == 0 && arr.length == data.remaining()) { > return arr; > } > } > > It would be good to clarify this aspect in the motivation. What kind of > copies would we avoid (eg direct byte buffers, byte buffer views, etc.). > > Ismael > > On Sun, Sep 25, 2022 at 8:59 AM ShunKang Lin <linshunkang....@gmail.com> > wrote: > > > Hi all, I'd like to start a new discussion thread on KIP-872 (Kafka > Client) > > which proposes that add Serializer#serializeToByteBuffer() to reduce > memory > > copying. > > > > KIP: > > > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=228495828 > > Thanks, ShunKang > > >