r7raul1984 opened a new pull request, #3800: URL: https://github.com/apache/celeborn/pull/3800
Previously, readBufferIntoReadBuffer allocated a temporary heap ByteBuffer on every call, performed a FileChannel read into it, then copied the data into the output ByteBuf — two copies and one allocation per read. Replace with a direct write loop using ByteBuf.writeBytes(FileChannel, pos, len), which writes from the channel straight into the output ByteBuf with no intermediate allocation. The channel position is advanced manually since the absolute-read API does not move the cursor. Benchmarks show ~2x throughput improvement and ~40% fewer GC collections at 1 MB buffer size over 500 iterations. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
