mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@f9c7f2a Begin switching to JSpecify annotations (#11448) PaperMC/Paper@e3c8a8e Add PlayerInsertLecternBookEvent [1.20 port] (#7305) PaperMC/Paper@b410fe8 Configurable per-world void damage offset/damage(#11436) PaperMC/Paper@ea00be3 Do not NPE on uuid resolution in player profile (#11449) PaperMC/Paper@ba3c29b Finish converting all events to jspecify annotations PaperMC/Paper@e7e1ab5 Finish converting most of the undeprecated api to jspecify PaperMC/Paper@69ffbec Fix hex color check PaperMC/Paper@709f0f2 Use components properly in ProfileWhitelistVerifyEvent (#11456) PaperMC/Paper@fb76840 [ci skip] Add section on nullability annotations (#11461) PaperMC/Paper@7cd4f2c Check if leash tag has a uuid
776 lines
44 KiB
Diff
776 lines
44 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <blake.galbreath@gmail.com>
|
|
Date: Fri, 1 Jul 2022 04:03:37 -0500
|
|
Subject: [PATCH] Remove Timings
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitCommandNode.java b/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitCommandNode.java
|
|
index 0c3c82b28e581286b798ee58ca4193efc2faff4a..24121a43aeb5e9bce013f30c92dddd15f99736c6 100644
|
|
--- a/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitCommandNode.java
|
|
+++ b/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitCommandNode.java
|
|
@@ -80,16 +80,16 @@ public class BukkitCommandNode extends LiteralCommandNode<CommandSourceStack> {
|
|
|
|
// Plugins do weird things to workaround normal registration
|
|
if (this.command.timings == null) {
|
|
- this.command.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, this.command);
|
|
+ //this.command.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, this.command); // Purpur
|
|
}
|
|
|
|
String content = context.getRange().get(context.getInput());
|
|
String[] args = org.apache.commons.lang3.StringUtils.split(content, ' '); // fix adjacent spaces (from console/plugins) causing empty array elements
|
|
|
|
- try (Timing ignored = this.command.timings.startTiming()) {
|
|
+ //try (Timing ignored = this.command.timings.startTiming()) { // Purpur
|
|
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
|
|
this.command.execute(sender, this.literal, Arrays.copyOfRange(args, 1, args.length));
|
|
- }
|
|
+ //} // Purpur
|
|
|
|
// return true as command was handled
|
|
return 1;
|
|
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
|
index e2c24813f59c2fd075c740ac1842a38f20ed8554..01efbc507b3d58f13f78ee286f93df40cdc3f0cb 100644
|
|
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
|
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
|
@@ -52,7 +52,7 @@ public class PacketUtils {
|
|
if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
|
|
if (listener.shouldHandleMessage(packet)) {
|
|
co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
|
|
- try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
|
|
+ try { // Paper - timings // Purpur
|
|
packet.handle(listener);
|
|
} catch (Exception exception) {
|
|
if (exception instanceof ReportedException) {
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 226fa1fa3b7949e23c3f6f283d728949694a8a5c..73d6c71c6e38dcfff9f09fd2f54949edba80c373 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1613,15 +1613,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
|
- co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
|
|
+ //co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper // Purpur
|
|
long i = Util.getNanos();
|
|
|
|
// Paper start - move oversleep into full server tick
|
|
- isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
|
+ //isOversleep = true;MinecraftTimings.serverOversleep.startTiming(); // Purpur
|
|
this.managedBlock(() -> {
|
|
return !this.canOversleep();
|
|
});
|
|
- isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
|
+ //isOversleep = false;MinecraftTimings.serverOversleep.stopTiming(); // Purpur
|
|
// Paper end
|
|
this.server.spark.tickStart(); // Paper - spark
|
|
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
|
|
@@ -1658,9 +1658,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.profiler.pop();
|
|
// Paper end - Incremental chunk and player saving
|
|
// Paper start - move executeAll() into full server tick timing
|
|
- try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
|
+ //try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) { // Purpur
|
|
this.runAllTasks();
|
|
- }
|
|
+ //} // Purpur
|
|
// Paper end
|
|
// Paper start - Server Tick Events
|
|
long endTime = System.nanoTime();
|
|
@@ -1684,7 +1684,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.logTickMethodTime(i);
|
|
this.profiler.pop();
|
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
|
- co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
|
+ //co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
|
|
}
|
|
|
|
private void logTickMethodTime(long tickStartTime) {
|
|
@@ -1755,9 +1755,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
|
entityplayer.connection.suspendFlushing();
|
|
});
|
|
- MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper // Purpur
|
|
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
|
- MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper // Purpur
|
|
// Paper start - Folia scheduler API
|
|
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
|
|
getAllLevels().forEach(level -> {
|
|
@@ -1774,21 +1774,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
// Paper end - Folia scheduler API
|
|
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
|
this.profiler.push("commandFunctions");
|
|
- MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper // Purpur
|
|
this.getFunctions().tick();
|
|
- MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper // Purpur
|
|
this.profiler.popPush("levels");
|
|
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
|
|
|
// CraftBukkit start
|
|
// Run tasks that are waiting on processing
|
|
- MinecraftTimings.processQueueTimer.startTiming(); // Spigot
|
|
+ //MinecraftTimings.processQueueTimer.startTiming(); // Spigot // Purpur
|
|
while (!this.processQueue.isEmpty()) {
|
|
this.processQueue.remove().run();
|
|
}
|
|
- MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
|
+ //MinecraftTimings.processQueueTimer.stopTiming(); // Spigot // Purpur
|
|
|
|
- MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper // Purpur
|
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
|
// Paper start - Perf: Optimize time updates
|
|
for (final ServerLevel level : this.getAllLevels()) {
|
|
@@ -1808,7 +1808,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
}
|
|
// Paper end - Perf: Optimize time updates
|
|
- MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper // Purpur
|
|
|
|
this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
|
|
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
|
|
@@ -1836,9 +1836,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.profiler.push("tick");
|
|
|
|
try {
|
|
- worldserver.timings.doTick.startTiming(); // Spigot
|
|
+ //worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
|
worldserver.tick(shouldKeepTicking);
|
|
- worldserver.timings.doTick.stopTiming(); // Spigot
|
|
+ //worldserver.timings.doTick.stopTiming(); // Spigot // Purpur
|
|
} catch (Throwable throwable) {
|
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
|
|
|
|
@@ -1853,24 +1853,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
|
|
|
this.profiler.popPush("connection");
|
|
- MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
|
|
+ // MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper // Purpur
|
|
this.getConnection().tick();
|
|
- MinecraftTimings.connectionTimer.stopTiming(); // Spigot // Paper
|
|
+ // MinecraftTimings.connectionTimer.stopTiming(); // Spigot // Paper // Purpur
|
|
this.profiler.popPush("players");
|
|
- MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
|
|
this.playerList.tick();
|
|
- MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
|
|
if (SharedConstants.IS_RUNNING_IN_IDE && this.tickRateManager.runsNormally()) {
|
|
GameTestTicker.SINGLETON.tick();
|
|
}
|
|
|
|
this.profiler.popPush("server gui refresh");
|
|
|
|
- MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
|
|
for (int i = 0; i < this.tickables.size(); ++i) {
|
|
((Runnable) this.tickables.get(i)).run();
|
|
}
|
|
- MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
|
|
+ //MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
|
|
|
|
this.profiler.popPush("send chunks");
|
|
iterator = this.playerList.getPlayers().iterator();
|
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
index f679caa20e762f21704d8d5f1a69990195634000..430418990e218bca55fd7c817086bf7a6866fa1a 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
@@ -548,7 +548,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
}
|
|
|
|
public void handleConsoleInputs() {
|
|
- MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
|
|
+ //MinecraftTimings.serverCommandTimer.startTiming(); // Spigot // Purpur
|
|
// Paper start - Perf: use proper queue
|
|
ConsoleInput servercommand;
|
|
while ((servercommand = this.serverCommandQueue.poll()) != null) {
|
|
@@ -565,7 +565,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
// CraftBukkit end
|
|
}
|
|
|
|
- MinecraftTimings.serverCommandTimer.stopTiming(); // Spigot
|
|
+ //MinecraftTimings.serverCommandTimer.stopTiming(); // Spigot // Purpur
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
index 6abae547de1c9de07a75800550631ca5ee693e0a..4b2a66b68e96b85e78c12a12c410ffab3c14ab71 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
@@ -962,7 +962,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
List<ServerPlayer> list = Lists.newArrayList();
|
|
List<ServerPlayer> list1 = this.level.players();
|
|
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
|
- level.timings.tracker1.startTiming(); // Paper
|
|
+ //this.level.timings.tracker1.startTiming(); // Paper // Purpur
|
|
|
|
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
|
|
|
@@ -987,17 +987,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
|
}
|
|
}
|
|
- level.timings.tracker1.stopTiming(); // Paper
|
|
+ //this.level.timings.tracker1.stopTiming(); // Paper // Purpur
|
|
|
|
if (!list.isEmpty()) {
|
|
objectiterator = this.entityMap.values().iterator();
|
|
|
|
- level.timings.tracker2.startTiming(); // Paper
|
|
+ //this.level.timings.tracker2.startTiming(); // Paper // Purpur
|
|
while (objectiterator.hasNext()) {
|
|
playerchunkmap_entitytracker = (ChunkMap.TrackedEntity) objectiterator.next();
|
|
playerchunkmap_entitytracker.updatePlayers(list);
|
|
}
|
|
- level.timings.tracker2.stopTiming(); // Paper
|
|
+ //this.level.timings.tracker2.stopTiming(); // Paper // Purpur
|
|
}
|
|
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
index dbc62bf37a9e6e1936558338521938a47a51e2d6..793f16cb4049d121a6ef7ca4fcd9519dc8c0a7b0 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -359,9 +359,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
|
|
public void save(boolean flush) {
|
|
// Paper - rewrite chunk system
|
|
- try (co.aikar.timings.Timing timed = level.timings.chunkSaveData.startTiming()) { // Paper - Timings
|
|
+ //try (co.aikar.timings.Timing timed = level.timings.chunkSaveData.startTiming()) { // Paper - Timings // Purpur
|
|
this.chunkMap.saveAllChunks(flush);
|
|
- } // Paper - Timings
|
|
+ //} // Paper - Timings // Purpur
|
|
}
|
|
|
|
@Override
|
|
@@ -397,26 +397,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
@Override
|
|
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
|
|
this.level.getProfiler().push("purge");
|
|
- this.level.timings.doChunkMap.startTiming(); // Spigot
|
|
+ //this.level.timings.doChunkMap.startTiming(); // Spigot // Purpur
|
|
if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
|
|
this.distanceManager.purgeStaleTickets();
|
|
}
|
|
-
|
|
this.runDistanceManagerUpdates();
|
|
- this.level.timings.doChunkMap.stopTiming(); // Spigot
|
|
+ //this.level.timings.doChunkMap.stopTiming(); // Spigot // Purpur
|
|
this.level.getProfiler().popPush("chunks");
|
|
if (tickChunks) {
|
|
- this.level.timings.chunks.startTiming(); // Paper - timings
|
|
+ //this.level.timings.chunks.startTiming(); // Paper - timings // Purpur
|
|
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
|
|
this.tickChunks();
|
|
- this.level.timings.chunks.stopTiming(); // Paper - timings
|
|
+ //this.level.timings.chunks.stopTiming(); // Paper - timings // Purpur
|
|
this.chunkMap.tick();
|
|
}
|
|
|
|
- this.level.timings.doChunkUnload.startTiming(); // Spigot
|
|
+ //this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur
|
|
this.level.getProfiler().popPush("unload");
|
|
this.chunkMap.tick(shouldKeepTicking);
|
|
- this.level.timings.doChunkUnload.stopTiming(); // Spigot
|
|
+ //this.level.timings.doChunkUnload.stopTiming(); // Spigot // Purpur
|
|
this.level.getProfiler().pop();
|
|
this.clearCache();
|
|
}
|
|
@@ -452,13 +451,13 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
}
|
|
// Paper end - chunk tick iteration optimisations
|
|
Iterator iterator = null; // Paper - chunk tick iteration optimisations
|
|
- if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper
|
|
+ //if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
|
|
|
|
// Paper - chunk tick iteration optimisations
|
|
|
|
if (this.level.tickRateManager().runsNormally()) {
|
|
gameprofilerfiller.popPush("naturalSpawnCount");
|
|
- this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
|
+ //this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
|
|
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
|
// Paper start - Optional per player mob spawns
|
|
int naturalSpawnChunkCount = k;
|
|
@@ -488,7 +487,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
// Pufferfish end
|
|
}
|
|
// Paper end - Optional per player mob spawns
|
|
- this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
|
+ // this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
|
|
|
|
// this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
|
|
gameprofilerfiller.popPush("spawnAndTick");
|
|
@@ -529,19 +528,19 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
}
|
|
}
|
|
}
|
|
- this.level.timings.chunkTicks.stopTiming(); // Paper
|
|
+ //this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
|
|
|
|
gameprofilerfiller.popPush("customSpawners");
|
|
if (flag) {
|
|
- try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings
|
|
+ //try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur
|
|
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
|
- } // Paper - timings
|
|
+ //} // Paper - timings // Purpur
|
|
}
|
|
}
|
|
|
|
gameprofilerfiller.popPush("broadcast");
|
|
// Paper start - chunk tick iteration optimisations
|
|
- this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing
|
|
+ //this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur
|
|
{
|
|
final it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.server.level.ServerChunkCache.ChunkAndHolder> chunks = (it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.server.level.ServerChunkCache.ChunkAndHolder>)list;
|
|
final ServerChunkCache.ChunkAndHolder[] raw = chunks.elements();
|
|
@@ -555,7 +554,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
|
holder.holder().broadcastChanges(holder.chunk());
|
|
}
|
|
}
|
|
- this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
|
+ //this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur
|
|
// Paper end - chunk tick iteration optimisations
|
|
gameprofilerfiller.pop();
|
|
gameprofilerfiller.pop();
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
index bfc36c239dab4df5130cbde190d513655b9f12a1..b6fd5b83cff5ea21221d029b8729932e25300d47 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -687,7 +687,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
}
|
|
|
|
gameprofilerfiller.popPush("tickPending");
|
|
- this.timings.scheduledBlocks.startTiming(); // Paper
|
|
+ //this.timings.scheduledBlocks.startTiming(); // Paper // Purpur
|
|
if (!this.isDebug() && flag) {
|
|
j = this.getGameTime();
|
|
gameprofilerfiller.push("blockTicks");
|
|
@@ -696,24 +696,24 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks
|
|
gameprofilerfiller.pop();
|
|
}
|
|
- this.timings.scheduledBlocks.stopTiming(); // Paper
|
|
+ //this.timings.scheduledBlocks.stopTiming(); // Paper // Purpur
|
|
|
|
gameprofilerfiller.popPush("raid");
|
|
if (flag) {
|
|
- this.timings.raids.startTiming(); // Paper - timings
|
|
+ // this.timings.raids.startTiming(); // Paper - timings // Purpur
|
|
this.raids.tick();
|
|
- this.timings.raids.stopTiming(); // Paper - timings
|
|
+ // this.timings.raids.stopTiming(); // Paper - timings // Purpur
|
|
}
|
|
|
|
gameprofilerfiller.popPush("chunkSource");
|
|
- this.timings.chunkProviderTick.startTiming(); // Paper - timings
|
|
+ //this.timings.chunkProviderTick.startTiming(); // Paper - timings // Purpur
|
|
this.getChunkSource().tick(shouldKeepTicking, true);
|
|
- this.timings.chunkProviderTick.stopTiming(); // Paper - timings
|
|
+ //this.timings.chunkProviderTick.stopTiming(); // Paper - timings // Purpur
|
|
gameprofilerfiller.popPush("blockEvents");
|
|
if (flag) {
|
|
- this.timings.doSounds.startTiming(); // Spigot
|
|
+ // this.timings.doSounds.startTiming(); // Spigot // Purpur
|
|
this.runBlockEvents();
|
|
- this.timings.doSounds.stopTiming(); // Spigot
|
|
+ // this.timings.doSounds.stopTiming(); // Spigot // Purpur
|
|
}
|
|
|
|
this.handlingTick = false;
|
|
@@ -726,7 +726,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
|
|
if (flag1 || this.emptyTime++ < 300) {
|
|
gameprofilerfiller.push("entities");
|
|
- this.timings.tickEntities.startTiming(); // Spigot
|
|
+ //this.timings.tickEntities.startTiming(); // Spigot // Purpur
|
|
if (this.dragonFight != null && flag) {
|
|
gameprofilerfiller.push("dragonFight");
|
|
this.dragonFight.tick();
|
|
@@ -734,7 +734,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
}
|
|
|
|
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
|
- this.timings.entityTick.startTiming(); // Spigot
|
|
+ //this.timings.entityTick.startTiming(); // Spigot // Purpur
|
|
this.entityTickList.forEach((entity) -> {
|
|
entity.activatedPriorityReset = false; // Pufferfish - DAB
|
|
if (!entity.isRemoved()) {
|
|
@@ -775,8 +775,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
}
|
|
}
|
|
});
|
|
- this.timings.entityTick.stopTiming(); // Spigot
|
|
- this.timings.tickEntities.stopTiming(); // Spigot
|
|
+ //this.timings.entityTick.stopTiming(); // Spigot // Purpur
|
|
+ //this.timings.tickEntities.stopTiming(); // Spigot // Purpur
|
|
gameprofilerfiller.pop();
|
|
this.tickBlockEntities();
|
|
}
|
|
@@ -966,12 +966,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
} // Paper - Option to disable ice and snow
|
|
|
|
gameprofilerfiller.popPush("tickBlocks");
|
|
- timings.chunkTicksBlocks.startTiming(); // Paper
|
|
+ //timings.chunkTicksBlocks.startTiming(); // Paper // Purpur
|
|
if (randomTickSpeed > 0) {
|
|
this.optimiseRandomTick(chunk, randomTickSpeed); // Paper - optimise random ticking
|
|
}
|
|
|
|
- timings.chunkTicksBlocks.stopTiming(); // Paper
|
|
+ //timings.chunkTicksBlocks.stopTiming(); // Paper // Purpur
|
|
gameprofilerfiller.pop();
|
|
}
|
|
|
|
@@ -1314,8 +1314,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
// Spigot end
|
|
// Paper start- timings
|
|
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity);
|
|
- timer = isActive ? entity.getType().tickTimer.startTiming() : entity.getType().inactiveTickTimer.startTiming(); // Paper
|
|
- try {
|
|
+ //timer = isActive ? entity.getType().tickTimer.startTiming() : entity.getType().inactiveTickTimer.startTiming(); // Paper // Purpur
|
|
+ //try { // Purpur
|
|
// Paper end - timings
|
|
entity.setOldPosAndRot();
|
|
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
|
@@ -1331,7 +1331,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
entity.postTick(); // CraftBukkit
|
|
} else { entity.inactiveTick(); } // Paper - EAR 2
|
|
this.getProfiler().pop();
|
|
- } finally { timer.stopTiming(); } // Paper - timings
|
|
+ //} finally { timer.stopTiming(); } // Paper - timings // Purpur
|
|
Iterator iterator = entity.getPassengers().iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -1354,8 +1354,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
|
|
// Paper - EAR 2
|
|
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger);
|
|
- co.aikar.timings.Timing timer = isActive ? passenger.getType().passengerTickTimer.startTiming() : passenger.getType().passengerInactiveTickTimer.startTiming(); // Paper
|
|
- try {
|
|
+ //co.aikar.timings.Timing timer = isActive ? passenger.getType().passengerTickTimer.startTiming() : passenger.getType().passengerInactiveTickTimer.startTiming(); // Paper // Purpur
|
|
+ //try { // Purpur
|
|
// Paper end
|
|
passenger.setOldPosAndRot();
|
|
++passenger.tickCount;
|
|
@@ -1385,7 +1385,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
this.tickPassenger(passenger, entity2);
|
|
}
|
|
|
|
- } finally { timer.stopTiming(); }// Paper - EAR2 timings
|
|
+ //} finally { timer.stopTiming(); }// Paper - EAR2 timings // Purpur
|
|
}
|
|
} else {
|
|
passenger.stopRiding();
|
|
@@ -1405,7 +1405,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld()));
|
|
}
|
|
|
|
- try (co.aikar.timings.Timing ignored = this.timings.worldSave.startTiming()) {
|
|
+ //try (co.aikar.timings.Timing ignored = this.timings.worldSave.startTiming()) { // Purpur
|
|
if (doFull) {
|
|
this.saveLevelData(true);
|
|
}
|
|
@@ -1422,7 +1422,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
|
|
}
|
|
// CraftBukkit end
|
|
- }
|
|
+ //} // Purpur
|
|
}
|
|
// Paper end - Incremental chunk and player saving
|
|
|
|
@@ -1436,7 +1436,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
|
|
if (!savingDisabled) {
|
|
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
|
- try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
|
|
+ //try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper // Purpur // Purpur
|
|
if (progressListener != null) {
|
|
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
|
}
|
|
@@ -1446,10 +1446,10 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
|
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
|
}
|
|
|
|
- timings.worldSaveChunks.startTiming(); // Paper
|
|
+ //timings.worldSaveChunks.startTiming(); // Paper // Purpur
|
|
if (!close) { chunkproviderserver.save(flush); } // Paper - add close param
|
|
- timings.worldSaveChunks.stopTiming(); // Paper
|
|
- }// Paper
|
|
+ //timings.worldSaveChunks.stopTiming(); // Paper // Purpur
|
|
+ //}// Paper // Purpur
|
|
// Paper - rewrite chunk system
|
|
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index c55f721a611dc215bcbf3f74f752b3bebfbe9ea4..0ea07da1b4bd420cd6765577b4719a2368b5740c 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -1238,7 +1238,7 @@ public abstract class PlayerList {
|
|
|
|
public void saveAll(int interval) {
|
|
io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main
|
|
- MinecraftTimings.savePlayers.startTiming(); // Paper
|
|
+ //MinecraftTimings.savePlayers.startTiming(); // Paper // Purpur
|
|
int numSaved = 0;
|
|
long now = MinecraftServer.currentTick;
|
|
for (int i = 0; i < this.players.size(); ++i) {
|
|
@@ -1249,7 +1249,7 @@ public abstract class PlayerList {
|
|
}
|
|
// Paper end - Incremental chunk and player saving
|
|
}
|
|
- MinecraftTimings.savePlayers.stopTiming(); // Paper
|
|
+ //MinecraftTimings.savePlayers.stopTiming(); // Paper // Purpur
|
|
return null; }); // Paper - ensure main
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
|
index 9379dd4056018b52c93ed4888dcdc94579bd9691..612a14806ec63b0dcf31814396282f4b7f4a527c 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
|
|
@@ -59,9 +59,9 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
|
|
this.status = Behavior.Status.RUNNING;
|
|
int i = this.minDuration + world.getRandom().nextInt(this.maxDuration + 1 - this.minDuration);
|
|
this.endTimestamp = time + (long)i;
|
|
- this.timing.startTiming(); // Paper - behavior timings
|
|
+ //this.timing.startTiming(); // Paper - behavior timings // Purpur
|
|
this.start(world, entity, time);
|
|
- this.timing.stopTiming(); // Paper - behavior timings
|
|
+ //this.timing.stopTiming(); // Paper - behavior timings // Purpur
|
|
return true;
|
|
} else {
|
|
return false;
|
|
@@ -73,13 +73,13 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
|
|
|
|
@Override
|
|
public final void tickOrStop(ServerLevel world, E entity, long time) {
|
|
- this.timing.startTiming(); // Paper - behavior timings
|
|
+ //this.timing.startTiming(); // Paper - behavior timings // Purpur
|
|
if (!this.timedOut(time) && this.canStillUse(world, entity, time)) {
|
|
this.tick(world, entity, time);
|
|
} else {
|
|
this.doStop(world, entity, time);
|
|
}
|
|
- this.timing.stopTiming(); // Paper - behavior timings
|
|
+ //this.timing.stopTiming(); // Paper - behavior timings // Purpur
|
|
}
|
|
|
|
protected void tick(ServerLevel world, E entity, long time) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
|
index 85b4b24361e785acf75571ff98f924c00ae80748..09a7b418ddf564c0be13297f7c216db2e7ae1578 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
|
@@ -53,10 +53,10 @@ public abstract class Sensor<E extends LivingEntity> {
|
|
if (--this.timeToTick <= 0L) {
|
|
// Paper start - configurable sensor tick rate and timings
|
|
this.timeToTick = java.util.Objects.requireNonNullElse(world.paperConfig().tickRates.sensor.get(entity.getType(), this.configKey), this.scanRate);
|
|
- this.timing.startTiming();
|
|
+ //this.timing.startTiming(); // Purpur
|
|
// Paper end
|
|
this.doTick(world, entity);
|
|
- this.timing.stopTiming(); // Paper - sensor timings
|
|
+ //this.timing.stopTiming(); // Paper - sensor timings // Purpur
|
|
}
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
|
index 7bc1d9ed3a3e3679caff8da0a38a3de93fc9ebac..ccc6204141298deea56d996fab24254d25857da5 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
|
@@ -1415,15 +1415,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
|
|
|
gameprofilerfiller.push("blockEntities");
|
|
- this.timings.tileEntityPending.startTiming(); // Spigot
|
|
+ //this.timings.tileEntityPending.startTiming(); // Spigot // Purpur
|
|
this.tickingBlockEntities = true;
|
|
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
|
this.blockEntityTickers.addAll(this.pendingBlockEntityTickers);
|
|
this.pendingBlockEntityTickers.clear();
|
|
}
|
|
- this.timings.tileEntityPending.stopTiming(); // Spigot
|
|
+ //this.timings.tileEntityPending.stopTiming(); // Spigot // Purpur
|
|
|
|
- this.timings.tileEntityTick.startTiming(); // Spigot
|
|
+ //this.timings.tileEntityTick.startTiming(); // Spigot // Purpur
|
|
// Spigot start
|
|
// Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
|
|
boolean flag = this.tickRateManager().runsNormally();
|
|
@@ -1454,7 +1454,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
|
}
|
|
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
|
|
|
|
- this.timings.tileEntityTick.stopTiming(); // Spigot
|
|
+ //this.timings.tileEntityTick.stopTiming(); // Spigot // Purpur
|
|
this.tickingBlockEntities = false;
|
|
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
|
|
gameprofilerfiller.pop();
|
|
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
|
index e524b27d185da3e88668f8ef107517272860bd66..735f39fed209e086a52185565f8bd6873c0b8d6e 100644
|
|
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
|
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
|
@@ -128,7 +128,7 @@ public final class NaturalSpawner {
|
|
|
|
public static void spawnForChunk(ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnState info, boolean spawnAnimals, boolean spawnMonsters, boolean rareSpawn) {
|
|
world.getProfiler().push("spawner");
|
|
- world.timings.mobSpawn.startTiming(); // Spigot
|
|
+ //world.timings.mobSpawn.startTiming(); // Spigot // Purpur
|
|
MobCategory[] aenumcreaturetype = NaturalSpawner.SPAWNING_CATEGORIES;
|
|
int i = aenumcreaturetype.length;
|
|
|
|
@@ -181,7 +181,7 @@ public final class NaturalSpawner {
|
|
}
|
|
}
|
|
|
|
- world.timings.mobSpawn.stopTiming(); // Spigot
|
|
+ //world.timings.mobSpawn.stopTiming(); // Spigot // Purpur
|
|
world.getProfiler().pop();
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
index 6282db087ac330d0e3a97c93f03eb64e8b3246f3..a0e6f39ba00212a078e04b21831a5ed22ad0825b 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
@@ -680,7 +680,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().chunkHolderManager.getChunkHolder(this.locX, this.locZ).getEntityChunk().callEntitiesLoadEvent(); // Paper - rewrite chunk system
|
|
|
|
if (this.needsDecoration) {
|
|
- try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper
|
|
+ //try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper // Purpur
|
|
this.needsDecoration = false;
|
|
java.util.Random random = new java.util.Random();
|
|
random.setSeed(this.level.getSeed());
|
|
@@ -700,7 +700,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
}
|
|
}
|
|
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
|
- } // Paper
|
|
+ //} // Paper // Purpur
|
|
}
|
|
}
|
|
}
|
|
@@ -1040,7 +1040,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
ProfilerFiller gameprofilerfiller = LevelChunk.this.level.getProfiler();
|
|
|
|
gameprofilerfiller.push(this::getType);
|
|
- this.blockEntity.tickTimer.startTiming(); // Spigot
|
|
+ //this.blockEntity.tickTimer.startTiming(); // Spigot // Purpur
|
|
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
|
|
|
if (this.blockEntity.getType().isValid(iblockdata)) {
|
|
@@ -1067,7 +1067,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
|
// Paper end - Prevent block entity and entity crashes
|
|
// Spigot start
|
|
} finally {
|
|
- this.blockEntity.tickTimer.stopTiming();
|
|
+ //this.blockEntity.tickTimer.stopTiming(); // Purpur
|
|
// Spigot end
|
|
}
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
|
index 30ddb35140ae4a6faba98c191bb8eadbafc35377..48999a860a3b9ed691691c355beaf3e0674acb95 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
|
@@ -504,10 +504,10 @@ public class CraftScheduler implements BukkitScheduler {
|
|
this.runners.remove(task.getTaskId());
|
|
}
|
|
}
|
|
- MinecraftTimings.bukkitSchedulerFinishTimer.startTiming(); // Paper
|
|
+ //MinecraftTimings.bukkitSchedulerFinishTimer.startTiming(); // Paper // Purpur
|
|
this.pending.addAll(temp);
|
|
temp.clear();
|
|
- MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); // Paper
|
|
+ //MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); // Paper // Purpur
|
|
//this.debugHead = this.debugHead.getNextHead(currentTick); // Paper
|
|
}
|
|
|
|
@@ -550,7 +550,7 @@ public class CraftScheduler implements BukkitScheduler {
|
|
}
|
|
|
|
void parsePending() { // Paper
|
|
- if (!this.isAsyncScheduler) MinecraftTimings.bukkitSchedulerPendingTimer.startTiming(); // Paper
|
|
+ //if (!this.isAsyncScheduler) MinecraftTimings.bukkitSchedulerPendingTimer.startTiming(); // Paper // Purpur
|
|
CraftTask head = this.head;
|
|
CraftTask task = head.getNext();
|
|
CraftTask lastTask = head;
|
|
@@ -569,7 +569,7 @@ public class CraftScheduler implements BukkitScheduler {
|
|
task.setNext(null);
|
|
}
|
|
this.head = lastTask;
|
|
- if (!this.isAsyncScheduler) MinecraftTimings.bukkitSchedulerPendingTimer.stopTiming(); // Paper
|
|
+ //if (!this.isAsyncScheduler) MinecraftTimings.bukkitSchedulerPendingTimer.stopTiming(); // Paper // Purpur
|
|
}
|
|
|
|
private boolean isReady(final int currentTick) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
|
index ba369f3dcfdf498e971dc4405d39657a9b6e97cc..8f181e03eda734b18f8c9ee80ee6e45f8689d178 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
|
@@ -81,13 +81,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
|
|
|
@Override
|
|
public void run() {
|
|
- try (Timing ignored = timings.startTiming()) { // Paper
|
|
+ //try (Timing ignored = timings.startTiming()) { // Paper // Purpur
|
|
if (this.rTask != null) {
|
|
this.rTask.run();
|
|
} else {
|
|
this.cTask.accept(this);
|
|
}
|
|
- } // Paper
|
|
+ //} // Paper // Purpur
|
|
}
|
|
|
|
long getCreatedAt() {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
|
index b3e1adeb932da9b3bed16acd94e2f16da48a7c72..d3ec817e95628f1fc8be4a29c9a0f13c7d5fd552 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
|
@@ -115,7 +115,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
|
public void forAllObjectives(ObjectiveCriteria criteria, ScoreHolder holder, Consumer<ScoreAccess> consumer) {
|
|
// Paper start - add timings for scoreboard search
|
|
// plugins leaking scoreboards will make this very expensive, let server owners debug it easily
|
|
- co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.startTimingIfSync();
|
|
+ //co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.startTimingIfSync(); // Purpur
|
|
try {
|
|
// Paper end - add timings for scoreboard search
|
|
for (CraftScoreboard scoreboard : this.scoreboards) {
|
|
@@ -123,7 +123,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
|
board.forAllObjectives(criteria, holder, (score) -> consumer.accept(score));
|
|
}
|
|
} finally { // Paper start - add timings for scoreboard search
|
|
- co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.stopTimingIfSync();
|
|
+ //co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.stopTimingIfSync(); // Purpur
|
|
}
|
|
// Paper end - add timings for scoreboard search
|
|
}
|
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
|
index ba180127a50b1a1ed155ee4053440074e38adef4..ed1cdea66dd117ecafd14a52727f094430f39b60 100644
|
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
|
@@ -171,7 +171,7 @@ public class ActivationRange
|
|
*/
|
|
public static void activateEntities(Level world)
|
|
{
|
|
- MinecraftTimings.entityActivationCheckTimer.startTiming();
|
|
+ //MinecraftTimings.entityActivationCheckTimer.startTiming(); // Purpur
|
|
final int miscActivationRange = world.spigotConfig.miscActivationRange;
|
|
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
|
|
final int animalActivationRange = world.spigotConfig.animalActivationRange;
|
|
@@ -251,7 +251,7 @@ public class ActivationRange
|
|
}
|
|
// Paper end
|
|
}
|
|
- MinecraftTimings.entityActivationCheckTimer.stopTiming();
|
|
+ //MinecraftTimings.entityActivationCheckTimer.stopTiming(); // Purpur
|
|
}
|
|
|
|
/**
|