mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-23 19:16:14 +01:00
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:
parent
365bb66d2a
commit
4f0fe72add
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user