From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 5 Feb 2017 00:04:04 -0500 Subject: [PATCH] Remove CraftScheduler Async Task Debugger I have not once ever seen this system help debug a crash. One report of a suspected memory leak with the system. This adds additional overhead to asynchronous task dispatching diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java index d05a9ae0fbdc8c9d86109a631d059299e51a2a39..8c48130db03e1baffa341222caa6a82b29525671 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -420,7 +420,7 @@ public class CraftScheduler implements BukkitScheduler { } parsePending(); } else { - debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass())); + //debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper executor.execute(new ServerSchedulerReportingWrapper(task)); // Paper // We don't need to parse pending // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) @@ -437,7 +437,7 @@ public class CraftScheduler implements BukkitScheduler { pending.addAll(temp); temp.clear(); MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); - debugHead = debugHead.getNextHead(currentTick); + //debugHead = debugHead.getNextHead(currentTick); // Paper } private void addTask(final CraftTask task) { @@ -497,10 +497,15 @@ public class CraftScheduler implements BukkitScheduler { @Override public String toString() { + // Paper start + return ""; + /* int debugTick = currentTick; StringBuilder string = new StringBuilder("Recent tasks from ").append(debugTick - RECENT_TICKS).append('-').append(debugTick).append('{'); debugHead.debugTo(string); return string.append('}').toString(); + */ + // Paper end } @Deprecated