mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-25 12:35:23 +01:00
4a59238743
Very early build, network configuration switching is supported but not tested (note: changes need to be backported to Paper) Changes: - Supports per player mob caps - Adds entity tracker optimisations which are not in Paper (and will not be ported to Paper due to plugin conflicts) - No longer reverts paper distance map optimisations, as those are replaced by the NearbyPlayers class These changes should bring Folia in-line with Paper's optimisations at least (probably more given the entity tracker optimisations), still missing features like world loading / some commands
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
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
|
|
index 3f283e1a5c181819b223c0f44cc5d8f274fd88a6..f9cf331202d0768a054e575c8909369920b3d59f 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -2877,6 +2877,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
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.RegionizedWorldData worldData = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegionizedWorldData(); // Folia - region threading
|
|
long startTime = System.nanoTime();
|