LuciferYang commented on PR #55924:
URL: https://github.com/apache/spark/pull/55924#issuecomment-5509905899

   readBinary and skipBinary do reach zero per-value allocations, but 
readGeoData still does `new byte[length]` per row, so geometry columns get no 
allocation/GC benefit here while the description says "the hot path performs 
zero per-value heap allocations", which reads as covering both paths. Keeping 
the per-value wkb is defensible (it feeds the converter and is then reused as 
prevBuf), but the description should scope the claim to the non-geo path; if 
you want to optimize it too, reading the suffix into prevBuf like readValues 
does would remove the allocation, though convert would need an offset/length 
overload so trailing stale bytes do not ride along when capacity exceeds the 
value.
   


-- 
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]

Reply via email to