mqliang opened a new issue #6714:
URL: https://github.com/apache/incubator-pinot/issues/6714


   As @siddharthteotia pointed out in 
https://github.com/apache/incubator-pinot/pull/6710#discussion_r599240463_
   
   > serialization functions first writes to a temporary output stream and then 
converts to byte array which is returned to the caller and written to the main 
stream. I think the reason for doing that is upfront we don't know the length 
of byte[] array to allocate.
   
   > However,  we can probably do different and it might be faster
   >* Write a loop to go over each entry and keep a running sum of size
   >* At the end of loop, allocate byte array of that size
   >* Start another loop and go over each entry again and fill out the 
pre-allocated byte array.
   >* Return the filled byte array
   
   We need to benchmark this two serialization approach. If the proposed 
approach is better, will send a PR to address it.


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

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