2018-01-18 07:00:51 +01:00
From fd37f4274286d7803935867537a4dd26f0859c25 Mon Sep 17 00:00:00 2001
2016-11-23 19:02:47 +01:00
From: vemacs <d@nkmem.es>
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
2018-01-18 07:00:51 +01:00
index 5c09c6ff7..13c6b5ccd 100644
2016-11-23 19:02:47 +01:00
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2017-08-03 16:36:06 +02:00
@@ -104,7 +104,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
2016-11-23 19:02:47 +01:00
private final GameProfileRepository X;
private final UserCache Y;
private long Z;
- protected final Queue<FutureTask<?>> j = new java.util.concurrent.ConcurrentLinkedQueue<FutureTask<?>>(); // Spigot, PAIL: Rename
+ protected final Queue<FutureTask<?>> j = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Spigot, PAIL: Rename // Paper - Make size() constant-time
private Thread serverThread;
private long ab = aw();
--
2018-01-18 07:00:51 +01:00
2.16.1
2016-11-23 19:02:47 +01:00