dlg99 commented on issue #1108: Replace DoubleByteBuf with CompositeByteBuf 
because of perf regression with Netty > 4.1.12
URL: https://github.com/apache/bookkeeper/pull/1108#issuecomment-362446493
 
 
   @jvrao 
   > Depending on the digest our header size changes. Hence we need to take 
care of that situation too.
   
   it is set for ledger when ledger is created.
   
   @merlimat 
   
   .allocate() creates HeapByteBuffer which is backed by byte[]
   May I suggest using java flight recorder/java mission control to profile 
memory allocations instead of heap dumps?
   Let me know if you want me to send steps on running it.
   
   > Though this would mean to copy each payload into a buffer that contains 
header+payload, right?
   
   As I mentioned, I did the changes on old code where client did not rely on 
netty buffers that much. 
   But the idea was to allocate (header length + data length) space at least 
(i.e. from pool), write payload with offset, fill in header later.  Client 
would get (buffer, int dataOffset, int dataLen) as parameters. If 0 to 
dataOffset is enough for the header just write it there and return slice. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to