mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Revert "Slow down queue a bit because 1.13+ performance is bad"
This reverts commit bbde2f5e06
.
This commit is contained in:
parent
e32a2e2723
commit
0021b114de
@ -491,9 +491,9 @@ public class Settings extends Config {
|
|||||||
|
|
||||||
@Comment("Settings relating to PlotSquared's GlobalBlockQueue")
|
@Comment("Settings relating to PlotSquared's GlobalBlockQueue")
|
||||||
public static final class QUEUE {
|
public static final class QUEUE {
|
||||||
@Comment({"Average time per tick spent completing chunk tasks in ms.",
|
@Comment({"Average time per tick spent completing chunk tasks in ms. Target average TPS = 20 * 50 / TARGET_TIME.",
|
||||||
"Waits (chunk task time / target_time) ticks before completely the next task."})
|
"Waits (chunk task time / target_time) ticks before completely the next task."})
|
||||||
public static int TARGET_TIME = 40;
|
public static int TARGET_TIME = 65;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ public class GlobalBlockQueue {
|
|||||||
private final RunnableVal2<Long, LocalBlockQueue> SET_TASK =
|
private final RunnableVal2<Long, LocalBlockQueue> SET_TASK =
|
||||||
new RunnableVal2<Long, LocalBlockQueue>() {
|
new RunnableVal2<Long, LocalBlockQueue>() {
|
||||||
@Override public void run(Long free, LocalBlockQueue queue) {
|
@Override public void run(Long free, LocalBlockQueue queue) {
|
||||||
long t1 = System.currentTimeMillis();
|
|
||||||
do {
|
do {
|
||||||
boolean more = queue.next();
|
boolean more = queue.next();
|
||||||
if (!more) {
|
if (!more) {
|
||||||
@ -67,9 +66,9 @@ public class GlobalBlockQueue {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} while (((GlobalBlockQueue.this.secondLast = System.currentTimeMillis())
|
} while ((lastPeriod =
|
||||||
- GlobalBlockQueue.this.last) < free);
|
((GlobalBlockQueue.this.secondLast = System.currentTimeMillis())
|
||||||
lastPeriod = System.currentTimeMillis() - t1;
|
- GlobalBlockQueue.this.last)) < free);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -125,8 +124,8 @@ public class GlobalBlockQueue {
|
|||||||
lastPeriod -= targetTime;
|
lastPeriod -= targetTime;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SET_TASK.value1 = 30 + Math.min(
|
SET_TASK.value1 = 50 + Math.min(
|
||||||
(30 + GlobalBlockQueue.this.last) - (GlobalBlockQueue.this.last =
|
(50 + GlobalBlockQueue.this.last) - (GlobalBlockQueue.this.last =
|
||||||
System.currentTimeMillis()),
|
System.currentTimeMillis()),
|
||||||
GlobalBlockQueue.this.secondLast - System.currentTimeMillis());
|
GlobalBlockQueue.this.secondLast - System.currentTimeMillis());
|
||||||
SET_TASK.value2 = GlobalBlockQueue.this.getNextQueue();
|
SET_TASK.value2 = GlobalBlockQueue.this.getNextQueue();
|
||||||
|
Loading…
Reference in New Issue
Block a user