Do not tick Chunk TickS for every chunk

This commit is contained in:
Shane Freeder
2021-06-03 06:13:18 +01:00
parent 55888af12f
commit d963592869
5 changed files with 14 additions and 9 deletions

View File

@@ -1113,7 +1113,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.p = spawnercreature_d;
this.world.getMethodProfiler().exit();
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
//List<PlayerChunk> list = Lists.newArrayList(this.playerChunkMap.f()); // Paper
//Collections.shuffle(list); // Paper
+ this.world.timings.chunkTicks.startTiming(); // Paper
this.playerChunkMap.f().forEach((playerchunk) -> { // Paper - no... just no...
Optional<Chunk> optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
if (optional.isPresent()) {
this.world.getMethodProfiler().enter("broadcast");
@@ -1128,14 +1132,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
- this.world.timings.doTickTiles.startTiming(); // Spigot
+ this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
+ //this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
this.world.a(chunk, k);
- this.world.timings.doTickTiles.stopTiming(); // Spigot
+ this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
+ //this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
}
}
}
});
+ this.world.timings.chunkTicks.stopTiming(); // Paper
this.world.getMethodProfiler().enter("customSpawners");
if (flag1) {
+ try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings