2023-03-20 10:48:16 +01: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
|
2024-06-19 23:42:39 +02:00
|
|
|
index 60cf9cf4120a83c9d634348e434772020a1665aa..7570c2f6048f3b937fa331e1b65ee1a6a1e03498 100644
|
2023-03-20 10:48:16 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
2024-06-19 23:42:39 +02:00
|
|
|
@@ -1518,6 +1518,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
2023-12-17 00:32:48 +01:00
|
|
|
// Folia end - region threading
|
2023-03-20 10:48:16 +01:00
|
|
|
|
|
|
|
public final void executeMidTickTasks() {
|
|
|
|
+ if (true) return; // Folia - disable mid-tick task execution
|
|
|
|
org.spigotmc.AsyncCatcher.catchOp("mid tick chunk task execution");
|
2023-03-25 00:22:47 +01:00
|
|
|
io.papermc.paper.threadedregions.RegionizedWorldData worldData = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegionizedWorldData(); // Folia - region threading
|
2023-03-20 10:48:16 +01:00
|
|
|
long startTime = System.nanoTime();
|