2023-03-20 17:48:16 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
Date: Mon, 20 Mar 2023 02:07:43 -0700
|
|
|
|
Subject: [PATCH] Disable mid-tick task execution
|
|
|
|
|
|
|
|
Mid-tick task execution acquires the ticket lock at least,
|
|
|
|
which can possibly be a significant performance bottleneck
|
|
|
|
at a high tick thread + region count. This change should reduce
|
|
|
|
the impact from scaling the region threads, but is not a fix
|
|
|
|
to the underlying issue.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
2023-03-23 22:55:26 +08:00
|
|
|
index 6bf90c2a71d03788b6b15f858687372674dddc03..d9f6855ff7a70bf1e05e8cf93ed33c847c6c86e6 100644
|
2023-03-20 17:48:16 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
2023-03-23 21:55:09 +08:00
|
|
|
@@ -2906,6 +2906,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
2023-03-20 17:48:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public final void executeMidTickTasks() {
|
|
|
|
+ if (true) return; // Folia - disable mid-tick task execution
|
|
|
|
org.spigotmc.AsyncCatcher.catchOp("mid tick chunk task execution");
|
|
|
|
io.papermc.paper.threadedregions.RegionisedWorldData worldData = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegionisedWorldData(); // Folia - region threading
|
|
|
|
long startTime = System.nanoTime();
|