From 4d7709bdec846b2845277b058b0fee0c2afb580d Mon Sep 17 00:00:00 2001 From: vemacs Date: Wed, 23 Nov 2016 12:54:56 -0500 Subject: [PATCH] Optimize Network Queue diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 02daa43c68..0560882314 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -118,7 +118,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati private final GameProfileRepository W; private final UserCache X; private long Y; - protected final Queue> g = Queues.newConcurrentLinkedQueue(); + protected final Queue> g = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Spigot, PAIL: Rename // Paper - Make size() constant-time private Thread serverThread; private long aa = SystemUtils.b(); private final IReloadableResourceManager ac; -- 2.18.0