ArrowBuf copying from GetReadableBuffer causes slowness
- Dominant language
- Java
- Stars
- 94
- Forks
- 152
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 11
Description
### Describe the usage question you have. Please include as many useful details as possible.
I'm using Arrow Flight and discovered an extra copy action while testing performance impact.
` ReadableBuffer readableBuffer = fastPath ? getReadableBuffer(stream) : null;
if (readableBuffer != null) {
readableBuffer.readBytes(buf.nioBuffer(0, size));
} `
The flame graph shows that after enabling zero_copy, ArrowBuf copying from GetReadableBuffer causes slowness.
Why does this copy occur?
Or is it because arrowbuf needs to manage its own memory, so the ownership must be transferred from netty?
### Component(s)
FlightRPC
Contributor guide
Research direction
Start with the FlightRPC fast path shown in the issue, following getReadableBuffer through ReadableBuffer.readBytes and the ArrowBuf destination while comparing the reported flame graph. Determine whether the copy is required for ownership or memory management, and document the cause or a clearly supported way to avoid it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100