vichry2 commented on issue #6670:
URL: https://github.com/apache/arrow-rs/issues/6670#issuecomment-2457890243

   > Thank you @vichry2 -- is this something we could make a PR in arrow-rs to 
improve?
   
   I think that would be good. Although just a minor improvement now, if ever 
non-contiguous memory buffers are implemented in tonic and incorporated in 
`FlightDataEncoder`, the recurring `malloc` calls would become more evident.
   
   I can investigate the difference in memory allocation by comparing the size 
of `arrow_data` initialized with 
[`RecordBatch.get_array_memory_size`](https://docs.rs/arrow/latest/arrow/record_batch/struct.RecordBatch.html#method.get_array_memory_size)
 to the current `arrow_data` Vec, to ensure we don’t reserve an excessive 
amount of unnecessary memory.
   


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

Reply via email to