mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-24 16:04:00 +08:00
perf: avoid multiple expansion when the number of elements in the MessageConst class is determined (#3721)
`HashSet`, threshold = initialCapacity * 0.75
This commit is contained in:
@@ -57,7 +57,7 @@ public class MessageConst {
|
||||
|
||||
public static final String KEY_SEPARATOR = " ";
|
||||
|
||||
public static final HashSet<String> STRING_HASH_SET = new HashSet<String>();
|
||||
public static final HashSet<String> STRING_HASH_SET = new HashSet<>(64);
|
||||
|
||||
static {
|
||||
STRING_HASH_SET.add(PROPERTY_TRACE_SWITCH);
|
||||
|
||||
Reference in New Issue
Block a user