sunithabeeram commented on issue #4127: Declare byte array size when 
initializing ByteArrayOutputStream
URL: https://github.com/apache/incubator-pinot/pull/4127#issuecomment-484147859
 
 
   Thanks for the info @jackjlli. A few more questions:
   - How big of a response is being sent back? Resize typically increases 
exponentially, so we shouldn't see too many resizes. I have chased some of 
these resize based optimizations in the past - although the theory is sound for 
runtime as well as garbage generated, the gains typically didn't materialize - 
which is why I am bit skeptical about this. If you have numbers to share for 
after this fix, that will help. Also, if possible, attaching the CPU profile 
snapshot showing the hotspot would be nice.
   - Should metadata serialization take the same approach? I am wondering if we 
are sending a lot more metadata back; that part of the code still doesn't 
initialize the size.
   - I didn't see a comment on the testing for this. Do we have existing tests 
covering all the paths for this method?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to