szetszwo commented on PR #6656:
URL: https://github.com/apache/ozone/pull/6656#issuecomment-2103109337

   > StringWithByteString still needs to repeatedly calculate 
ByteString.copyFromUtf8, which moves the call of ByteString.copyFromUtf8 from 
inside protobuf to StringWithByteString (Some DatanodeDetails have short 
lifecycles, may only be accessed once)
   
   Only the `DatanodeDetails` created from the `Builder` needs converting.  The 
`DatanodeDetails` created from another `DatanodeDetails` does not (updated the 
code in my previous comment).  The short lived `DatanodeDetails` probably are 
not created by the `Builder`.  No?
   
   BTW, we could also change `Builder` to pass `StringWithByteString` when 
converting proto-to-`DatanodeDetails`.  Then, it will already have the 
`ByteString`.


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