Paper/Spigot-Server-Patches/0090-Catch-Async-PlayerChunkMap-operations.patch
Aikar 3faaaab75d Optimize isInvalidYLocation, getType and getBlockData
Some pretty micro optimizations, but this is the hottest method in the server....

This will drastically reduce number of operations to perform getType

the 2 previous patches was squashed into 1
2016-06-22 22:43:02 -04:00

27 lines
981 B
Diff

From e3ba0fd0099369577e52fad29db661e97692ee11 Mon Sep 17 00:00:00 2001
From: Daniel Ennis <dennis@icontact.com>
Date: Sun, 20 Mar 2016 15:22:42 -0400
Subject: [PATCH] Catch Async PlayerChunkMap operations
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index df6801f..6320247 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -440,10 +440,12 @@ public class PlayerChunkMap {
}
public void a(PlayerChunk playerchunk) {
+ org.spigotmc.AsyncCatcher.catchOp("Async Player Chunk Add"); // Paper
this.f.add(playerchunk);
}
public void b(PlayerChunk playerchunk) {
+ org.spigotmc.AsyncCatcher.catchOp("Async Player Chunk Remove"); // Paper
ChunkCoordIntPair chunkcoordintpair = playerchunk.a();
long i = d(chunkcoordintpair.x, chunkcoordintpair.z);
--
2.9.0