Open Mr00Anderson opened 1 year ago
After we did some review, it was determined that keeping the history of journal and wallet transaction was causing the profile to bloat to 1.2 GB and in memory 13GB or so. It does not appear that the strings from stockpiles was actually the culprit and it was just the 500k lines of history. So turning off the history keeps this from bloating. Manual pruning works, but requires software or a careful hand in editing XML files.
Once my Jeveassets has gotten robust I had to close most tabs, and still use 12GB ram. This is fine for me, not however for low end computers.
Some options were used in the JVM for string and did not work. I ran application on JRE 20 and still was the same points. Upon profiling it tends to be the strings in the tables when looking at memory of the heap on a live application.
By setting up a system where weak references are used, when nothing is references one of the list of strings, it will become eligible for GC, however that means all the strings in the table or list must also not be hard references anywhere and be weakly references. Java has a Weak List/Maps as well as. I will provide profiling data from jprofile to this thread in about 2-3 weeks. Sometime around May15-25th.
Here are some lite primers for anyone following, not all inclusive design Tanique more of the basic what and how.
References Baeldung. (2022, September 3). Guide to WeakHashMap in Java. Baeldung. https://www.baeldung.com/java-weakhashmap
Dąbrowski, M. (2022, November 28). Strong, Weak, Soft, and Phantom References in Java. Baeldung. https://www.baeldung.com/java-reference-types
Difference between compact strings and compressed strings in Java 9. (n.d.). Stack Overflow. https://stackoverflow.com/questions/44178432/difference-between-compact-strings-and-
compressed-strings-in-java-9 Java: difference between strong/soft/weak/phantom reference. (n.d.). Stack Overflow. https://stackoverflow.com/questions/9809074/java-difference-between-strong-soft-weak-phantom-reference
WeakReference (Java Platform SE 8 ). (2023, April 5). https://docs.oracle.com/javase/8/docs/api/java/lang/ref/WeakReference.html