xichen01 opened a new pull request, #6656:
URL: https://github.com/apache/ozone/pull/6656

   ## What changes were proposed in this pull request?
   Reduce `com/google/protobuf/ByteString.copyFromUtf8` when encode a protobuf 
Object.
   - For a String type protobuf field, if you use the `setXXX` method (such as 
`builder.setHostName`), the protobuf will call `ByteString.copyFromUtf8` 
convert UTF8 String to `ByteString`. 
   - For some UTF8 String with fixed content, we can cache its `ByteString` 
value, and use `setXXXBytes` to avoid calling `ByteString.copyFromUtf8`
   
   Before
   
https://issues.apache.org/jira/secure/attachment/13068731/om-create-key-alloc-profiler-setxxxString.html
   
   After
   The `com/google/protobuf/ByteString.copyFromUtf8` in the `DatanodeDetail` 
disappear.
   
https://issues.apache.org/jira/secure/attachment/13068732/om-create-key-alloc-profiler-setxxbytes.html
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-10811
   
   ## How was this patch tested?
   Existing Test.
   


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