From 0a5408a7d0d1093e277b743e2f5afde678392657 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 29 Sep 2019 14:06:03 -0700 Subject: [PATCH] Add more timings to chunk provider tick (#2549) - Misc mob spawning - Chunk range checks --- .../Asynchronous-chunk-IO-and-loading.patch | 16 +++---- Spigot-Server-Patches/Timings-v2.patch | 43 +++++++++++++++++-- ...ement-optional-per-player-mob-spawns.patch | 20 ++++----- 3 files changed, 58 insertions(+), 21 deletions(-) diff --git a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch index 5a408c75fd..ba4a4d3836 100644 --- a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch @@ -121,12 +121,12 @@ tasks required to be executed by the chunk load task (i.e lighting and some poi tasks). diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index 92c32c48d2..f4d5db02f7 100644 +index 3a79cde595..8de6c4816c 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +0,0 @@ public class WorldTimingsHandler { - public final Timing worldSaveLevel; - public final Timing chunkSaveData; + public final Timing chunkRangeCheckBig; + public final Timing chunkRangeCheckSmall; + public final Timing poiUnload; + public final Timing chunkUnload; @@ -143,9 +143,9 @@ index 92c32c48d2..f4d5db02f7 100644 String name = server.worldData.getName() +" - "; @@ -0,0 +0,0 @@ public class WorldTimingsHandler { - chunkProviderTick = Timings.ofSafe(name + "Chunk provider tick"); - broadcastChunkUpdates = Timings.ofSafe(name + "Broadcast chunk updates"); - countNaturalMobs = Timings.ofSafe(name + "Count natural mobs"); + miscMobSpawning = Timings.ofSafe(name + "Mob spawning - Misc"); + chunkRangeCheckBig = Timings.ofSafe(name + "Chunk Tick Range - Big"); + chunkRangeCheckSmall = Timings.ofSafe(name + "Chunk Tick Range - Small"); + + poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); + chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); @@ -2347,7 +2347,7 @@ index 0000000000..1d69715e26 + +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index e0bd03b3be..f793ba08e7 100644 +index 56761afdf4..277c2245d7 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { @@ -2897,7 +2897,7 @@ index 23d1935dd5..14f8b61042 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2293360407..d2c0299730 100644 +index ccf359dff1..a256f043ad 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { @@ -645,7 +645,7 @@ index a7fc34f85..612b9b7e3 100644 return this.ba; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 9daf64bad..95ee33513 100644 +index 9daf64bad4..95ee335135 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -684,7 +684,7 @@ index 9daf64bad..95ee33513 100644 private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index c6ea37ffb..9d4a96ae4 100644 +index c6ea37ffbd..9d4a96ae49 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -0,0 +0,0 @@ package net.minecraft.server; @@ -757,7 +757,7 @@ index c6ea37ffb..9d4a96ae4 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 845575f52..ee3789b38 100644 +index 845575f52e..ee3789b38c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World {