lhotari commented on a change in pull request #12957:
URL: https://github.com/apache/pulsar/pull/12957#discussion_r786549998



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/common/naming/NamespaceBundle.java
##########
@@ -124,7 +124,7 @@ public String getBundleRange() {
         return bundleRange;
     }
 
-    private static String getKey(NamespaceName nsname, Range<Long> keyRange) {
+    public static String getKey(NamespaceName nsname, Range<Long> keyRange) {
         return String.format("%s/0x%08x_0x%08x", nsname, 
keyRange.lowerEndpoint(), keyRange.upperEndpoint());

Review comment:
       The performance of String.format is bad and it causes a lot of 
allocations. It's fine to use it when there aren't a large number of 
invocations. That was optimized for NamespaceBundle in #9976.




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


Reply via email to