mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-01-06 15:51:30 +00:00
Nvmr
This commit is contained in:
@@ -100,13 +100,7 @@ public class IrisEngineSVC implements IrisService {
|
||||
Engine engine = supplier.get();
|
||||
if (engine != null) {
|
||||
long unloadStart = System.currentTimeMillis();
|
||||
int count = 0;
|
||||
if (!lastUse.isEmpty()){
|
||||
count = engine.getMantle().unloadTectonicPlate(tectonicLimit.get() / lastUse.size());
|
||||
} else {
|
||||
count = engine.getMantle().unloadTectonicPlate(tectonicLimit.get());
|
||||
}
|
||||
|
||||
int count = engine.getMantle().unloadTectonicPlate();
|
||||
if (count > 0) {
|
||||
Iris.debug(C.GOLD + "Unloaded " + C.YELLOW + count + " TectonicPlates in " + C.RED + Form.duration(System.currentTimeMillis() - unloadStart, 2));
|
||||
}
|
||||
|
||||
@@ -178,8 +178,8 @@ public interface EngineMantle extends IObjectPlacer {
|
||||
default void trim(int limit) {
|
||||
getMantle().trim(TimeUnit.SECONDS.toMillis(IrisSettings.get().getPerformance().getMantleKeepAlive()), limit);
|
||||
}
|
||||
default int unloadTectonicPlate(int tectonicLimit){
|
||||
return getMantle().unloadTectonicPlate(tectonicLimit);
|
||||
default int unloadTectonicPlate(){
|
||||
return getMantle().unloadTectonicPlate();
|
||||
}
|
||||
|
||||
default MultiBurst burst() {
|
||||
|
||||
@@ -444,11 +444,7 @@ public class Mantle {
|
||||
}
|
||||
}
|
||||
|
||||
public int unloadTectonicPlate(int tectonicLimit) {
|
||||
// todo: make a advanced unloader
|
||||
if (toUnload.size() > tectonicLimit / lastUse.size()){
|
||||
dynamicThreads.set(2);
|
||||
}
|
||||
public int unloadTectonicPlate() {
|
||||
AtomicInteger i = new AtomicInteger();
|
||||
unloadLock.lock();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user