You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2017/12/09 00:03:02 UTC

[GitHub] merlimat commented on a change in pull request #952: Reduce duplicate string allocation for GC improvements

merlimat commented on a change in pull request #952: Reduce duplicate string allocation for GC improvements
URL: https://github.com/apache/incubator-pulsar/pull/952#discussion_r155902407
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractReplicator.java
 ##########
 @@ -211,7 +211,7 @@ public static String getRemoteCluster(String remoteCursor) {
     }
 
     public static String getReplicatorName(String replicatorPrefix, String cluster) {
-        return String.format("%s.%s", replicatorPrefix, cluster);
+        return (replicatorPrefix + "." + cluster).intern();
 
 Review comment:
   Couldn't the string be interned also after `String.format()` ? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services