warrenzhu25 commented on issue #7074: URL: https://github.com/apache/datafusion-comet/issues/7074#issuecomment-7325442102
I'd like to take this one. I touched this path in #7787, so I'll do it in small, separately measurable steps, with `CometShuffleBenchmark` / the JVM shuffle micro-benchmarks before and after each: 1. Bypass writer: reuse the first `getPartition` result. 2. `RowPartition`: replace `ArrayBuffer[Long]` / `ArrayBuffer[Int]` with grown `long[]` / `int[]` plus a count, so `addRow` stops boxing and `getRowAddresses` / `getRowSizes` stop unboxing (same for `SpillSorter`'s read-back). 3. Check what the per-row `synchronized` in `CometDiskBlockWriter.insertRow` actually guards against the spill path, and narrow or remove it if only the task thread touches that state. 4. Write the `UnsafeRow` bytes straight into the page instead of going through the serializer stream and `ExposedByteArrayOutputStream`, keeping the length prefix native expects. If 3 or 4 turn out riskier than they look, I'll split them into a follow-up PR. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
