mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 14:21:33 +00:00
Nvmr
This commit is contained in:
@@ -100,13 +100,7 @@ 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 = 0;
|
int count = engine.getMantle().unloadTectonicPlate();
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,8 +178,8 @@ public interface EngineMantle extends IObjectPlacer {
|
|||||||
default void trim(int limit) {
|
default void trim(int limit) {
|
||||||
getMantle().trim(TimeUnit.SECONDS.toMillis(IrisSettings.get().getPerformance().getMantleKeepAlive()), limit);
|
getMantle().trim(TimeUnit.SECONDS.toMillis(IrisSettings.get().getPerformance().getMantleKeepAlive()), limit);
|
||||||
}
|
}
|
||||||
default int unloadTectonicPlate(int tectonicLimit){
|
default int unloadTectonicPlate(){
|
||||||
return getMantle().unloadTectonicPlate(tectonicLimit);
|
return getMantle().unloadTectonicPlate();
|
||||||
}
|
}
|
||||||
|
|
||||||
default MultiBurst burst() {
|
default MultiBurst burst() {
|
||||||
|
|||||||
@@ -444,11 +444,7 @@ public class Mantle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int unloadTectonicPlate(int tectonicLimit) {
|
public int unloadTectonicPlate() {
|
||||||
// todo: make a advanced unloader
|
|
||||||
if (toUnload.size() > tectonicLimit / lastUse.size()){
|
|
||||||
dynamicThreads.set(2);
|
|
||||||
}
|
|
||||||
AtomicInteger i = new AtomicInteger();
|
AtomicInteger i = new AtomicInteger();
|
||||||
unloadLock.lock();
|
unloadLock.lock();
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user