Commented out broken cleaner
This commit is contained in:
parent
adfdb571d8
commit
b179ee4636
@ -40,7 +40,7 @@ public class JCWDatabase implements AutoCloseable, Cleanable {
|
|||||||
}));
|
}));
|
||||||
this.databaseCleaner = new Cleaner(this);
|
this.databaseCleaner = new Cleaner(this);
|
||||||
|
|
||||||
this.databaseCleaner.start();
|
//this.databaseCleaner.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> EntryReference<LightList<T>> getRoot() throws IOException {
|
public <T> EntryReference<LightList<T>> getRoot() throws IOException {
|
||||||
|
@ -57,20 +57,22 @@ public class App {
|
|||||||
long time2_1 = System.currentTimeMillis();
|
long time2_1 = System.currentTimeMillis();
|
||||||
System.out.println("Time elapsed: " + (time2_1 - time2_0));
|
System.out.println("Time elapsed: " + (time2_1 - time2_0));
|
||||||
ObjectList<Animal> results = new ObjectArrayList<>();
|
ObjectList<Animal> results = new ObjectArrayList<>();
|
||||||
|
|
||||||
|
/*
|
||||||
root.forEach((value) -> {
|
root.forEach((value) -> {
|
||||||
if (Animal.hasFourLegs(value)) {
|
if (Animal.hasFourLegs(value)) {
|
||||||
results.add(value);
|
results.add(value);
|
||||||
}
|
}
|
||||||
//System.out.println("val:" + value);
|
//System.out.println("val:" + value);
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
long time2_2 = System.currentTimeMillis();
|
long time2_2 = System.currentTimeMillis();
|
||||||
System.out.println("Time elapsed: " + (time2_2 - time2_1));
|
System.out.println("Time elapsed: " + (time2_2 - time2_1));
|
||||||
System.out.println("Used memory: "
|
System.out.println("Used memory: "
|
||||||
+ ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024) + "MB");
|
+ ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024) + "MB");
|
||||||
System.out.println("Used memory: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024) + "MB");
|
System.out.println("Used memory: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024) + "MB");
|
||||||
System.out.println("Cleaning database (to reduce the amount of used memory and detect memory leaks)...");
|
System.out.println("Cleaning database (to reduce the amount of used memory and detect memory leaks)...");
|
||||||
long removedItems = db.clean();
|
long removedItems = 0;//db.clean();
|
||||||
time3 = System.currentTimeMillis();
|
time3 = System.currentTimeMillis();
|
||||||
System.out.println("Removed items: " + removedItems);
|
System.out.println("Removed items: " + removedItems);
|
||||||
System.out.println("Used memory: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024) + "MB");
|
System.out.println("Used memory: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024) + "MB");
|
||||||
|
Loading…
Reference in New Issue
Block a user