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 2022/09/09 15:49:37 UTC

[GitHub] [pulsar] coderzc commented on a diff in pull request #17575: [cleanup][broker] Use set instead of list to improve `contains` and `containsAll` performance.

coderzc commented on code in PR #17575:
URL: https://github.com/apache/pulsar/pull/17575#discussion_r967225355


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2337,7 +2336,7 @@ public class ServiceConfiguration implements PulsarConfiguration {
         category = CATEGORY_LOAD_BALANCER,
         doc = "Supported algorithms name for namespace bundle split"
     )
-    private List<String> supportedNamespaceBundleSplitAlgorithms = Lists.newArrayList("range_equally_divide",
+    private Set<String> supportedNamespaceBundleSplitAlgorithms = Sets.newHashSet("range_equally_divide",

Review Comment:
   No, I base on master. See:
   https://github.com/apache/pulsar/blob/master/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java#L2335-L2341
   
   I should be change it to `Set.of()` ?



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org