exchange sender should aovid memory copy with all bests
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Enhancement
-
CHBlockChunkCodec->encode() applies for a block of continues memory (as string) to hold the data from a block. However, encode() resizes many times to achieve the goal size, this costs cannot be ignored.
in detail, the resize starts from 15, then 30 ... -
as gRPC recommend to resuse objects to send or receive data, we should reuse the MPPDataPacket when sending. (done in receiver)
-
to benefit from 2, we should limit the size of sending data at a range, thus the reused objects will work.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating CHBlockChunkCodec::encode() and the sender-side MPPDataPacket handling; compare the latter with the receiver reuse mentioned in the issue. Review the gRPC guidance linked in the issue and trace how outgoing blocks are sized and sent. Done means reducing repeated encode() resizing, reusing MPPDataPacket objects for sending, and constraining send sizes as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, grpc
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100