mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 22:32:04 +00:00
Quick fix
This commit is contained in:
@@ -100,7 +100,13 @@ public class IrisEngineSVC implements IrisService {
|
|||||||
Engine engine = supplier.get();
|
Engine engine = supplier.get();
|
||||||
if (engine != null) {
|
if (engine != null) {
|
||||||
long unloadStart = System.currentTimeMillis();
|
long unloadStart = System.currentTimeMillis();
|
||||||
int count = engine.getMantle().unloadTectonicPlate(tectonicLimit.get() / lastUse.size());
|
int count = 0;
|
||||||
|
if (!lastUse.isEmpty()){
|
||||||
|
count = engine.getMantle().unloadTectonicPlate(tectonicLimit.get() / lastUse.size());
|
||||||
|
} else {
|
||||||
|
count = engine.getMantle().unloadTectonicPlate(tectonicLimit.get());
|
||||||
|
}
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
Iris.debug(C.GOLD + "Unloaded " + C.YELLOW + count + " TectonicPlates in " + C.RED + Form.duration(System.currentTimeMillis() - unloadStart, 2));
|
Iris.debug(C.GOLD + "Unloaded " + C.YELLOW + count + " TectonicPlates in " + C.RED + Form.duration(System.currentTimeMillis() - unloadStart, 2));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ public class Mantle {
|
|||||||
|
|
||||||
public int unloadTectonicPlate(int tectonicLimit) {
|
public int unloadTectonicPlate(int tectonicLimit) {
|
||||||
// todo: make a advanced unloader
|
// todo: make a advanced unloader
|
||||||
if (toUnload.size() > tectonicLimit){
|
if (toUnload.size() > tectonicLimit / lastUse.size()){
|
||||||
dynamicThreads.set(2);
|
dynamicThreads.set(2);
|
||||||
}
|
}
|
||||||
AtomicInteger i = new AtomicInteger();
|
AtomicInteger i = new AtomicInteger();
|
||||||
|
|||||||
Reference in New Issue
Block a user