From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?= Date: Thu, 2 Apr 2020 12:30:35 +0800 Subject: [PATCH] Remove method profiler callers diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index f741a034e8eae0a250aa16b26e56f173c88a9769..ae40078d0ffa13c71337d9422eb0524de08a1458 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -602,33 +602,33 @@ public class ChunkProviderServer extends IChunkProvider { // CraftBukkit start - modelled on below public void purgeUnload() { - this.world.getMethodProfiler().enter("purge"); + //this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller this.chunkMapDistance.purgeTickets(); this.tickDistanceManager(); - this.world.getMethodProfiler().exitEnter("unload"); + //this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller this.playerChunkMap.unloadChunks(() -> true); - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller this.clearCache(); } // CraftBukkit end public void tick(BooleanSupplier booleansupplier) { - this.world.getMethodProfiler().enter("purge"); + //this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller this.world.timings.doChunkMap.startTiming(); // Spigot this.chunkMapDistance.purgeTickets(); this.world.getMinecraftServer().midTickLoadChunks(); // Paper this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot - this.world.getMethodProfiler().exitEnter("chunks"); + //this.world.getMethodProfiler().exitEnter("chunks"); // Akarin - remove caller this.world.timings.chunks.startTiming(); // Paper - timings this.tickChunks(); this.world.timings.chunks.stopTiming(); // Paper - timings this.world.timings.doChunkUnload.startTiming(); // Spigot - this.world.getMethodProfiler().exitEnter("unload"); + //this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller this.playerChunkMap.unloadChunks(booleansupplier); this.world.getMinecraftServer().midTickLoadChunks(); // Paper this.world.timings.doChunkUnload.stopTiming(); // Spigot - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller this.clearCache(); } @@ -642,7 +642,7 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit if (!flag) { - this.world.getMethodProfiler().enter("pollingChunks"); + //this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); BlockPosition blockposition = this.world.getSpawn(); // CraftBukkit start - Other mob type spawn tick rate @@ -653,7 +653,7 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag2 = spawnAnimalThisTick; // CraftBukkit end - this.world.getMethodProfiler().enter("naturalSpawnCount"); + //this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller this.world.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.chunkMapDistance.b(); EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); @@ -675,7 +675,7 @@ public class ChunkProviderServer extends IChunkProvider { // Paper end this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller //Paper start - call player naturally spawn event int chunkRange = world.spigotConfig.mobSpawnRange; chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; @@ -691,18 +691,18 @@ public class ChunkProviderServer extends IChunkProvider { if (optional.isPresent()) { Chunk chunk = (Chunk) optional.get(); - this.world.getMethodProfiler().enter("broadcast"); + //this.world.getMethodProfiler().enter("broadcast"); // Akarin - remove caller this.world.timings.broadcastChunkUpdates.startTiming(); // Paper - timings playerchunk.a(chunk); this.world.timings.broadcastChunkUpdates.stopTiming(); // Paper - timings - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); if (!this.playerChunkMap.isOutsideOfRange(chunkcoordintpair)) { // Paper end chunk.setInhabitedTime(chunk.getInhabitedTime() + j); if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot - this.world.getMethodProfiler().enter("spawner"); + //this.world.getMethodProfiler().enter("spawner"); // Akarin - remove caller this.world.timings.mobSpawn.startTiming(); // Spigot EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype; int i1 = aenumcreaturetype.length; @@ -762,7 +762,7 @@ public class ChunkProviderServer extends IChunkProvider { } this.world.timings.mobSpawn.stopTiming(); // Spigot - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } this.world.timings.chunkTicks.startTiming(); // Spigot // Paper @@ -772,15 +772,15 @@ public class ChunkProviderServer extends IChunkProvider { } } }); - this.world.getMethodProfiler().enter("customSpawners"); + //this.world.getMethodProfiler().enter("customSpawners"); // Akarin - remove caller if (flag1) { try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings this.chunkGenerator.doMobSpawning(this.world, this.allowMonsters, this.allowAnimals); } // Paper - timings } - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } this.playerChunkMap.g(); diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java index ee42e1dfa493c3d7f5af8cc7b8e17e80fcb32b71..bd9684c4ed0d8e71278fbf8547b34899c62c108e 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java @@ -70,7 +70,7 @@ public class CustomFunctionData implements IResourcePackListener { this.a(customfunction, this.f()); } - this.server.getMethodProfiler().exit(); + //this.server.getMethodProfiler().exit(); // Akarin - remove caller if (this.m) { this.m = false; Collection collection = this.h().b(CustomFunctionData.e).a(); @@ -86,7 +86,7 @@ public class CustomFunctionData implements IResourcePackListener { this.a(customfunction1, this.f()); } - this.server.getMethodProfiler().exit(); + //this.server.getMethodProfiler().exit(); // Akarin - remove caller } } @@ -132,7 +132,7 @@ public class CustomFunctionData implements IResourcePackListener { this.j.clear(); } } finally { - this.server.getMethodProfiler().exit(); + //this.server.getMethodProfiler().exit(); // Akarin - remove caller } ++k; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 6571cf1eee3ba1c064e064a84a5d3135759b58e7..147c5288a567bd7e4a262cc67dbae9c4164b23b8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -395,7 +395,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke // CraftBukkit end public void entityBaseTick() { - this.world.getMethodProfiler().enter("entityBaseTick"); + //this.world.getMethodProfiler().enter("entityBaseTick"); // Akarin - remove caller if (this.isPassenger() && this.getVehicle().dead) { this.stopRiding(); } @@ -448,7 +448,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } this.justCreated = false; - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } // Paper start @@ -563,7 +563,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } } - this.world.getMethodProfiler().enter("move"); + //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller if (this.y.g() > 1.0E-7D) { vec3d = vec3d.h(this.y); this.y = Vec3D.a; @@ -584,8 +584,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.recalcPosition(); } - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("rest"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("rest"); // Akarin - remove caller this.positionChanged = !MathHelper.b(vec3d.x, vec3d1.x) || !MathHelper.b(vec3d.z, vec3d1.z); this.v = vec3d.y != vec3d1.y; this.onGround = this.v && vec3d.y < 0.0D; @@ -707,7 +707,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fireTicks = -this.getMaxFireTicks(); } - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } } @@ -2208,7 +2208,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.af) { if ((true || this.world.getMinecraftServer().getAllowNether()) && !this.isPassenger() && this.ag++ >= i) { // CraftBukkit - this.world.getMethodProfiler().enter("portal"); + //this.world.getMethodProfiler().enter("portal"); // Akarin - remove caller this.ag = i; this.portalCooldown = this.ba(); // CraftBukkit start @@ -2218,7 +2218,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.a(this.world.worldProvider.getDimensionManager().getType() == DimensionManager.NETHER ? DimensionManager.OVERWORLD : DimensionManager.NETHER); } // CraftBukkit end - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } this.af = false; @@ -2596,7 +2596,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public Entity teleportTo(DimensionManager dimensionmanager, BlockPosition location) { // CraftBukkit end if (!this.world.isClientSide && !this.dead) { - this.world.getMethodProfiler().enter("changeDimension"); + //this.world.getMethodProfiler().enter("changeDimension"); // Akarin - remove caller MinecraftServer minecraftserver = this.getMinecraftServer(); DimensionManager dimensionmanager1 = this.dimension; WorldServer worldserver = minecraftserver.getWorldServer(dimensionmanager1); @@ -2609,7 +2609,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke // this.dimension = dimensionmanager; // this.decouple(); // CraftBukkit end - this.world.getMethodProfiler().enter("reposition"); + //this.world.getMethodProfiler().enter("reposition"); // Akarin - remove caller Vec3D vec3d = this.getMot(); float f = 0.0F; BlockPosition blockposition = location; // CraftBukkit @@ -2688,7 +2688,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.decouple(); // CraftBukkit end - this.world.getMethodProfiler().exitEnter("reloading"); + //this.world.getMethodProfiler().exitEnter("reloading"); // Akarin - remove caller Entity entity = this.getEntityType().a((World) worldserver1); if (entity != null) { @@ -2707,10 +2707,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } this.dead = true; - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller worldserver.resetEmptyTime(); worldserver1.resetEmptyTime(); - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller return entity; } else { return null; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java index 1991cee43d429574f2c0889f807e7cd090f7d7dd..e9f00a1e131faa42d280cab255bc61cd1dcddf2a 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -223,13 +223,13 @@ public abstract class EntityInsentient extends EntityLiving { @Override public void entityBaseTick() { super.entityBaseTick(); - this.world.getMethodProfiler().enter("mobBaseTick"); + //this.world.getMethodProfiler().enter("mobBaseTick"); // Akarin - remove caller if (this.isAlive() && this.random.nextInt(1000) < this.e++) { this.l(); this.B(); } - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } @Override @@ -523,7 +523,7 @@ public abstract class EntityInsentient extends EntityLiving { @Override public void movementTick() { super.movementTick(); - this.world.getMethodProfiler().enter("looting"); + //this.world.getMethodProfiler().enter("looting"); // Akarin - remove caller if (!this.world.isClientSide && this.canPickupLoot() && this.isAlive() && !this.killed && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { List list = this.world.a(EntityItem.class, this.getBoundingBox().grow(1.0D, 0.0D, 1.0D)); Iterator iterator = list.iterator(); @@ -542,7 +542,7 @@ public abstract class EntityInsentient extends EntityLiving { } } - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } protected void a(EntityItem entityitem) { @@ -676,30 +676,30 @@ public abstract class EntityInsentient extends EntityLiving { return; } // Paper end - this.world.getMethodProfiler().enter("sensing"); + //this.world.getMethodProfiler().enter("sensing"); // Akarin - remove caller this.bw.a(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("targetSelector"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("targetSelector"); // Akarin - remove caller this.targetSelector.doTick(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("goalSelector"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("goalSelector"); // Akarin - remove caller this.goalSelector.doTick(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("navigation"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller this.navigation.c(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("mob tick"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller this.mobTick(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("controls"); - this.world.getMethodProfiler().enter("move"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("controls"); // Akarin - remove caller + //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller this.moveController.a(); - this.world.getMethodProfiler().exitEnter("look"); + //this.world.getMethodProfiler().exitEnter("look"); // Akarin - remove caller this.lookController.a(); - this.world.getMethodProfiler().exitEnter("jump"); + //this.world.getMethodProfiler().exitEnter("jump"); // Akarin - remove caller this.bq.b(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().exit(); // Akarin - remove caller this.K(); } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index ad474500e2f6fd6ad6db7bf2436b74c2d9d6136a..e93b7b280968ad1620a24fb06f2e5a503bdecad0 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -242,7 +242,7 @@ public abstract class EntityLiving extends Entity { } super.entityBaseTick(); - this.world.getMethodProfiler().enter("livingEntityBaseTick"); + //this.world.getMethodProfiler().enter("livingEntityBaseTick"); // Akarin - remove caller boolean flag = this instanceof EntityHuman; if (this.isAlive()) { @@ -344,7 +344,7 @@ public abstract class EntityLiving extends Entity { this.aL = this.aK; this.lastYaw = this.yaw; this.lastPitch = this.pitch; - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } protected void b(BlockPosition blockposition) { @@ -2412,10 +2412,10 @@ public abstract class EntityLiving extends Entity { } this.aS += (f3 - this.aS) * 0.3F; - this.world.getMethodProfiler().enter("headTurn"); + //this.world.getMethodProfiler().enter("headTurn"); // Akarin - remove caller f2 = this.f(f1, f2); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("rangeChecks"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("rangeChecks"); // Akarin - remove caller while (this.yaw - this.lastYaw < -180.0F) { this.lastYaw -= 360.0F; @@ -2449,7 +2449,7 @@ public abstract class EntityLiving extends Entity { this.aL += 360.0F; } - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller this.aT += f2; if (this.isGliding()) { ++this.bm; @@ -2586,19 +2586,19 @@ public abstract class EntityLiving extends Entity { } this.setMot(d4, d5, d6); - this.world.getMethodProfiler().enter("ai"); + //this.world.getMethodProfiler().enter("ai"); // Akarin - remove caller if (this.isFrozen()) { this.jumping = false; this.aZ = 0.0F; this.bb = 0.0F; } else if (this.doAITick()) { - this.world.getMethodProfiler().enter("newAi"); + //this.world.getMethodProfiler().enter("newAi"); // Akarin - remove caller this.doTick(); - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("jump"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("jump"); // Akarin - remove caller if (this.jumping) { if (this.N > 0.0D && (!this.onGround || this.N > 0.4D)) { this.c(TagsFluid.WATER); @@ -2614,23 +2614,23 @@ public abstract class EntityLiving extends Entity { this.jumpTicks = 0; } - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("travel"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("travel"); // Akarin - remove caller this.aZ *= 0.98F; this.bb *= 0.98F; this.n(); AxisAlignedBB axisalignedbb = this.getBoundingBox(); this.e(new Vec3D((double) this.aZ, (double) this.ba, (double) this.bb)); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("push"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("push"); // Akarin - remove caller if (this.bn > 0) { --this.bn; this.a(axisalignedbb, this.getBoundingBox()); } this.collideNearby(); - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } private void n() { diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java index 6e0020ae0b4d2f2597843129b83fff0d194de337..9d94aa135e1374112c5282e009a8407e2f0e1d37 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -144,9 +144,9 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @Override protected void mobTick() { - this.world.getMethodProfiler().enter("brain"); + //this.world.getMethodProfiler().enter("brain"); // Akarin - remove caller this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller if (!this.et() && this.bB > 0) { --this.bB; if (this.bB <= 0) { diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index a353f3d5fa5a5f54335f73584589de3f5cb20d3e..81e699b404c3c93a2a0b50d8960c1276067c6580 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -285,7 +285,7 @@ public class Explosion { if (!iblockdata.isAir()) { BlockPosition blockposition1 = blockposition.immutableCopy(); - this.world.getMethodProfiler().enter("explosion_blocks"); + //this.world.getMethodProfiler().enter("explosion_blocks"); // Akarin - remove caller if (block.a(this) && this.world instanceof WorldServer) { TileEntity tileentity = block.isTileEntity() ? this.world.getTileEntity(blockposition) : null; LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.a).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity).setOptional(LootContextParameters.THIS_ENTITY, this.source); @@ -301,7 +301,7 @@ public class Explosion { this.world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3); block.wasExploded(this.world, blockposition, this); - this.world.getMethodProfiler().exit(); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index c8b10a039f0592d03cc4c0de90da2b62c9aeaeba..36e11bb25fce4b63b1a476ccd1b8a3a8e8aab5e8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -936,13 +936,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down //MinecraftServer.LOGGER.debug("Autosave started"); // Paper serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper - this.methodProfiler.enter("save"); + //this.methodProfiler.enter("save"); // Akarin - remove caller if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // Paper this.playerList.savePlayers(); }// Paper @@ -1163,11 +1163,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot this.snooper.a(); } @@ -1176,8 +1176,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant iterator = this.d.iterator(); iterator.hasNext();) { PathfinderGoalWrapped wrappedGoal = iterator.next(); @@ -96,8 +96,8 @@ public class PathfinderGoalSelector { } }); - this.e.exit(); - this.e.enter("goalUpdate"); + //this.e.exit(); // Akarin - remove caller + //this.e.enter("goalUpdate"); // Akarin - remove caller // Paper start - remove streams from pathfindergoalselector goal_update_loop: for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { PathfinderGoalWrapped wrappedGoal = iterator.next(); @@ -140,8 +140,8 @@ public class PathfinderGoalSelector { wrappedGoal.c(); } // Paper end - remove streams from pathfindergoalselector - this.e.exit(); - this.e.enter("goalTick"); + //this.e.exit(); // Akarin - remove caller + //this.e.enter("goalTick"); // Akarin - remove caller // Paper start - remove streams from pathfindergoalselector for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { PathfinderGoalWrapped wrappedGoal = iterator.next(); @@ -150,7 +150,7 @@ public class PathfinderGoalSelector { } } // Paper end - remove streams from pathfindergoalselector - this.e.exit(); + //this.e.exit(); // Akarin - remove caller } public Stream c() { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 7929fcc800064fa23b260c3ecbed75f846bb375a..e1225d5017cc0b65a4fd5ac753a705a11679cf2b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -185,7 +185,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.E = 0; } - this.minecraftServer.getMethodProfiler().enter("keepAlive"); + //this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Akarin - remove caller // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings // This should effectively place the keepalive handling back to "as it was" before 1.12.2 long currentTime = SystemUtils.getMonotonicMillis(); @@ -207,7 +207,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } // Paper end - this.minecraftServer.getMethodProfiler().exit(); + //this.minecraftServer.getMethodProfiler().exit(); // Akarin - remove caller // CraftBukkit start for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ; if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java index 3f1aa5ced697490b5481ba992cf5af5dc98b8166..af705e6c650b529c18bdd8f0c063a71c750783f6 100644 --- a/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java @@ -65,7 +65,7 @@ public class TickListServer implements TickList { ChunkProviderServer chunkproviderserver = this.f.getChunkProvider(); Iterator> iterator = this.nextTickList.iterator(); - this.f.getMethodProfiler().enter("cleaning"); + //this.f.getMethodProfiler().enter("cleaning"); // Akarin - remove caller this.timingCleanup.startTiming(); // Paper NextTickListEntry nextticklistentry; @@ -86,7 +86,7 @@ public class TickListServer implements TickList { this.timingCleanup.stopTiming(); // Paper this.timingTicking.startTiming(); // Paper - this.f.getMethodProfiler().exitEnter("ticking"); + //this.f.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller while ((nextticklistentry = (NextTickListEntry) this.g.poll()) != null) { if (chunkproviderserver.a(nextticklistentry.a)) { @@ -105,7 +105,7 @@ public class TickListServer implements TickList { } } - this.f.getMethodProfiler().exit(); + //this.f.getMethodProfiler().exit(); // Akarin - remove caller this.timingTicking.stopTiming(); // Paper this.h.clear(); this.g.clear(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index d554d4cf0f0a13b598c6b14d618ba463c9895f35..ef632a5f9cb480e77026f2f1123f76896f12478c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -375,9 +375,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { IBlockData iblockdata2 = this.getType(blockposition); if (iblockdata2 != iblockdata1 && (iblockdata2.b((IBlockAccess) this, blockposition) != iblockdata1.b((IBlockAccess) this, blockposition) || iblockdata2.h() != iblockdata1.h() || iblockdata2.g() || iblockdata1.g())) { - this.methodProfiler.enter("queueCheckLight"); + //this.methodProfiler.enter("queueCheckLight"); // Akarin - remove caller this.getChunkProvider().getLightEngine().a(blockposition); - this.methodProfiler.exit(); + //this.methodProfiler.exit(); // Akarin - remove caller } /* diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index 84a3367b87a77cfba50c4f28a4e3e70d5b91d330..2da0cb6c963d2e1b609c79c83778f8e5e95967b5 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -849,7 +849,7 @@ public class WorldServer extends World { } public void chunkCheck(Entity entity) { - this.getMethodProfiler().enter("chunkCheck"); + //this.getMethodProfiler().enter("chunkCheck"); // Akarin - remove caller int i = MathHelper.floor(entity.locX() / 16.0D); int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior; int k = MathHelper.floor(entity.locZ() / 16.0D); @@ -866,7 +866,7 @@ public class WorldServer extends World { } } - this.getMethodProfiler().exit(); + //this.getMethodProfiler().exit(); // Akarin - remove caller } @Override