mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
remove vt for authenticator pool
This commit is contained in:
@@ -71,23 +71,6 @@ index 3ba558634558b4524245a2b29786237f5e38ef42..b6f67c4359e718db8eb9240a22e71fd0
|
||||
// Paper end - AsyncTabCompleteEvent
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 20ba45054c243fbb85e50cf0bdf75648730cb0bc..10aecbb88a9a3dae3ecdf28aa449f1a1475a1905 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -53,7 +53,11 @@ import org.bukkit.event.player.PlayerPreLoginEvent;
|
||||
public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, TickablePacketListener {
|
||||
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
|
||||
static final Logger LOGGER = LogUtils.getLogger();
|
||||
- private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
||||
+ // DivineMC start - Virtual Threads
|
||||
+ private static final java.util.concurrent.ExecutorService authenticatorPool = org.bxteam.divinemc.config.DivineConfig.PerformanceCategory.virtualThreadsEnabled && org.bxteam.divinemc.config.DivineConfig.PerformanceCategory.virtualAuthenticatorScheduler
|
||||
+ ? java.util.concurrent.Executors.newVirtualThreadPerTaskExecutor()
|
||||
+ : java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
||||
+ // DivineMC end - Virtual Threads
|
||||
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
|
||||
private final byte[] challenge;
|
||||
final MinecraftServer server;
|
||||
diff --git a/net/minecraft/server/network/ServerTextFilter.java b/net/minecraft/server/network/ServerTextFilter.java
|
||||
index b3d46e7687c572d9847124eb58e4a6011a78066c..9d2e2b1cff68383cd19b42e24559e3009ef1df54 100644
|
||||
--- a/net/minecraft/server/network/ServerTextFilter.java
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Player ProfileResult caching
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 10aecbb88a9a3dae3ecdf28aa449f1a1475a1905..9285697a1da3f216e03b8ea824f07f7f7c716c53 100644
|
||||
index 20ba45054c243fbb85e50cf0bdf75648730cb0bc..443aebb71b2a55ee9dcd2dd4bf9a30fbb8da9e49 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -75,6 +75,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -71,6 +71,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
public @Nullable java.util.UUID requestedUuid; // Paper
|
||||
private final io.papermc.paper.connection.PaperPlayerLoginConnection paperLoginConnection; // Paper - Config API
|
||||
private volatile boolean disconnecting = false; // Paper - Fix disconnect still ticking login
|
||||
@@ -20,7 +20,7 @@ index 10aecbb88a9a3dae3ecdf28aa449f1a1475a1905..9285697a1da3f216e03b8ea824f07f7f
|
||||
|
||||
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection, boolean transferred) {
|
||||
this.server = server;
|
||||
@@ -260,9 +265,23 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -256,9 +261,23 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
String string1 = Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized");
|
||||
|
||||
try {
|
||||
|
||||
@@ -5,10 +5,18 @@ Subject: [PATCH] Async Join Thread
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 9285697a1da3f216e03b8ea824f07f7f7c716c53..de4d2bd780c98c8c06db5e9375d447dae4d4429e 100644
|
||||
index 443aebb71b2a55ee9dcd2dd4bf9a30fbb8da9e49..cd926f0576d73bc3ef41c9a075a7ac9c54c9dd41 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -186,22 +186,25 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -53,7 +53,6 @@ import org.bukkit.event.player.PlayerPreLoginEvent;
|
||||
public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, TickablePacketListener {
|
||||
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
|
||||
static final Logger LOGGER = LogUtils.getLogger();
|
||||
- private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
||||
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
|
||||
private final byte[] challenge;
|
||||
final MinecraftServer server;
|
||||
@@ -182,22 +181,25 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
return;
|
||||
}
|
||||
// Paper end - Add Velocity IP Forwarding Support
|
||||
@@ -40,7 +48,7 @@ index 9285697a1da3f216e03b8ea824f07f7f7c716c53..de4d2bd780c98c8c06db5e9375d447da
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,7 +262,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -255,7 +257,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
|
||||
// Paper start - Cache authenticator threads
|
||||
@@ -50,7 +58,7 @@ index 9285697a1da3f216e03b8ea824f07f7f7c716c53..de4d2bd780c98c8c06db5e9375d447da
|
||||
@Override
|
||||
public void run() {
|
||||
String string1 = Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized");
|
||||
@@ -410,16 +414,23 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -406,16 +409,23 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
//TODO Update handling for lazy sessions, might not even have to do anything?
|
||||
|
||||
// Proceed with login
|
||||
|
||||
@@ -399,7 +399,6 @@ public class DivineConfig {
|
||||
public static boolean virtualThreadsEnabled = false;
|
||||
public static boolean virtualBukkitScheduler = false;
|
||||
public static boolean virtualChatScheduler = false;
|
||||
public static boolean virtualAuthenticatorScheduler = false;
|
||||
public static boolean virtualTabCompleteScheduler = false;
|
||||
public static boolean virtualAsyncExecutor = false;
|
||||
public static boolean virtualCommandBuilderScheduler = false;
|
||||
@@ -523,8 +522,6 @@ public class DivineConfig {
|
||||
"Uses virtual threads for the Bukkit scheduler.");
|
||||
virtualChatScheduler = getBoolean(ConfigCategory.PERFORMANCE.key("virtual-threads.chat-scheduler"), virtualChatScheduler,
|
||||
"Uses virtual threads for the Chat scheduler.");
|
||||
virtualAuthenticatorScheduler = getBoolean(ConfigCategory.PERFORMANCE.key("virtual-threads.authenticator-scheduler"), virtualAuthenticatorScheduler,
|
||||
"Uses virtual threads for the Authenticator scheduler.");
|
||||
virtualTabCompleteScheduler = getBoolean(ConfigCategory.PERFORMANCE.key("virtual-threads.tab-complete-scheduler"), virtualTabCompleteScheduler,
|
||||
"Uses virtual threads for the Tab Complete scheduler.");
|
||||
virtualAsyncExecutor = getBoolean(ConfigCategory.PERFORMANCE.key("virtual-threads.async-executor"), virtualAsyncExecutor,
|
||||
|
||||
Reference in New Issue
Block a user