Use ConcurrentHashMap to improve performance (#2226)
* modified hashset collections for small performance gains * reverted load factor modification since no noticeable performance gain was seen --------- Co-authored-by: aseef <contact@aseef.dev>
This commit is contained in:
1 parent
365bb66d2a
commit
4f0fe72add
1 file changed
+1
-1
+1
-1
@@ -101,7 +101,7 @@ public class NettyChannelInjector implements Injector {
|
||||
|
||||
// packet marking
|
||||
private final Map<Object, NetworkMarker> savedMarkers = new WeakHashMap<>(16, 0.9f);
|
||||
private final Set<Object> skippedPackets = Collections.synchronizedSet(new HashSet<>());
|
||||
private final Set<Object> skippedPackets = ConcurrentHashMap.newKeySet();
|
||||
protected final ThreadLocal<Boolean> processedPackets = ThreadLocal.withInitial(() -> Boolean.FALSE);
|
||||
|
||||
// status of this injector
|
||||
|
||||
Reference in new issue
Block a user