geforkt von Mirrors/Paper
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
Dieser Commit ist enthalten in:
Ursprung
d2f4d82ce2
Commit
5a81bf12ef
@ -432,7 +432,7 @@ public class CraftScheduler implements BukkitScheduler {
|
|||||||
}
|
}
|
||||||
this.parsePending();
|
this.parsePending();
|
||||||
} else {
|
} else {
|
||||||
this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(this.currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass()));
|
// this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(this.currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
|
||||||
this.executor.execute(new com.destroystokyo.paper.ServerSchedulerReportingWrapper(task)); // Paper
|
this.executor.execute(new com.destroystokyo.paper.ServerSchedulerReportingWrapper(task)); // Paper
|
||||||
// We don't need to parse pending
|
// 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)
|
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||||
@ -447,7 +447,7 @@ public class CraftScheduler implements BukkitScheduler {
|
|||||||
}
|
}
|
||||||
this.pending.addAll(temp);
|
this.pending.addAll(temp);
|
||||||
temp.clear();
|
temp.clear();
|
||||||
this.debugHead = this.debugHead.getNextHead(this.currentTick);
|
//this.debugHead = this.debugHead.getNextHead(this.currentTick); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addTask(final CraftTask task) {
|
private void addTask(final CraftTask task) {
|
||||||
@ -505,10 +505,15 @@ public class CraftScheduler implements BukkitScheduler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
// Paper start
|
||||||
|
return "";
|
||||||
|
/*
|
||||||
int debugTick = this.currentTick;
|
int debugTick = this.currentTick;
|
||||||
StringBuilder string = new StringBuilder("Recent tasks from ").append(debugTick - CraftScheduler.RECENT_TICKS).append('-').append(debugTick).append('{');
|
StringBuilder string = new StringBuilder("Recent tasks from ").append(debugTick - CraftScheduler.RECENT_TICKS).append('-').append(debugTick).append('{');
|
||||||
this.debugHead.debugTo(string);
|
this.debugHead.debugTo(string);
|
||||||
return string.append('}').toString();
|
return string.append('}').toString();
|
||||||
|
*/
|
||||||
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren