13
0
geforkt von Mirrors/Paper

Prevent unbounded TickList growth on busy servers (>1000 events/tick). This completes another Bleeding request.

Dieser Commit ist enthalten in:
Mike Primm 2011-12-14 08:58:01 -06:00 committet von Nathan Adams
Ursprung 52c526f313
Commit cc05bea457

Datei anzeigen

@ -2306,8 +2306,14 @@ public class World implements IBlockAccess {
throw new IllegalStateException("TickNextTick list out of synch"); throw new IllegalStateException("TickNextTick list out of synch");
} else { } else {
if (i > 1000) { if (i > 1000) {
// CraftBukkit start - if the server has too much to process over time, try to alleviate that
if(i > 20 * 1000) {
i = i / 20;
} else {
i = 1000; i = 1000;
} }
// CraftBukkit end
}
for (int j = 0; j < i; ++j) { for (int j = 0; j < i; ++j) {
NextTickListEntry nextticklistentry = (NextTickListEntry) this.K.first(); NextTickListEntry nextticklistentry = (NextTickListEntry) this.K.first();