maoling commented on code in PR #1910: URL: https://github.com/apache/zookeeper/pull/1910#discussion_r961556050
########## zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java: ########## @@ -588,9 +589,7 @@ public void processRequest(Request request) { StringBuilder sb = new StringBuilder(); byte[] payload = request.readRequestBytes(); if (payload != null) { - for (byte b : payload) { - sb.append(String.format("%02x", (0xff & b))); - } + HexUtil.encodeHex(payload, sb); Review Comment: - It could not be better if you can use the `JMH` framework to test this new method comparing to the old one, convincing us the new one is more efficient. - BTW, `PrepRequestProcessor` also has this code snippet -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org