iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

Thrift zero-copy optimization for TElasticFramedTransport

Open MrQuansy opened this issue 1 year ago • 1 comments

Previously, these methods of TElasticFramedTransport are not override implemented. TBinaryProtocol will allocate new byte array and copy from frame buffer. After this pr, TBinaryProtocol can wrap the byte buffer with the reference of frame buffer segment, which eliminates the cost of memory allocation and memory copying.

image

We use benchmark to evaluate this optimization (Insert Tablet with text value type):

  • Before image
  • After image

MrQuansy avatar Feb 19 '24 12:02 MrQuansy

@OneSizeFitsQuorum PTAL

MrQuansy avatar Feb 19 '24 12:02 MrQuansy