mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Performance Improvements
This commit is contained in:
parent
1c21b23e8e
commit
d3c47fe1a4
@ -90,7 +90,7 @@ public class HunkRegionSlice<T> {
|
||||
}
|
||||
|
||||
public synchronized void save() {
|
||||
BurstExecutor e = MultiBurst.burst.burst();
|
||||
BurstExecutor e = MultiBurst.burstAux.burst();
|
||||
for (ChunkPosition i : save.copy()) {
|
||||
if (i == null) {
|
||||
continue;
|
||||
|
@ -25,16 +25,21 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class MultiBurst {
|
||||
public static final MultiBurst burst = new MultiBurst(Runtime.getRuntime().availableProcessors());
|
||||
public static final MultiBurst burst = new MultiBurst("Iris Burster", 10, Runtime.getRuntime().availableProcessors());
|
||||
public static final MultiBurst burstAux = new MultiBurst("Iris Aux Burster", 8, Runtime.getRuntime().availableProcessors()/2);
|
||||
private final ExecutorService service;
|
||||
private ExecutorService syncService;
|
||||
private int tid;
|
||||
|
||||
|
||||
public MultiBurst(int tc) {
|
||||
this("Iris Generator", 6, tc);
|
||||
}
|
||||
public MultiBurst(String name, int priority, int tc) {
|
||||
service = Executors.newFixedThreadPool(tc, r -> {
|
||||
tid++;
|
||||
Thread t = new Thread(r);
|
||||
t.setName("Iris Generator " + tid);
|
||||
t.setName(name + " " + tid);
|
||||
t.setPriority(6);
|
||||
t.setUncaughtExceptionHandler((et, e) ->
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user