Open Kneesnap opened 4 years ago
It appears there's a memory leak. If you load a map, it keeps that MapMesh loaded in memory even after exiting. Honestly, I've looked pretty hard for the source of the leak, and I can't find it. I'm thinking that maybe it's possible the UI components themselves are either loaded indirectly by JavaFX, or directly by us, but YourKit won't seem to give me information on what is referencing the MapMeshes.
I cleared everything, stuff was still kept in memory. I think we're going to somehow have to workaround the problem, which seems most likely to be related to JavaFX
This should be better improved now, since the memory leaks are gone. We still need to do further research on why this happens on certain Java versions when saving though. I'll see if Kao is willing to help profile the issue.
May I also add that Java 1.8.0_131 works as well?
This needs testing after the new PP20 packer. @andyeder can you read your discord DMs when you get a chance? It regards testing this + some other things.
For some reason, certain versions of Java run into issues displaying the map viewer and saving the MWD.
Working Versions: 1.8.0_111, 1.8.0_144, 1.8.0_172, and 1.8.0_181 Not Working Versions: 1.8.0_161, 1.8.0_201, and 1.8.0_231
TextureTree is pretty memory intensive, but I'm not sure why the different java version causes issues or not. We should probably attempt to reduce memory usage by a bit, but also look into why different java versions may cause this issue.
Some setups seem to be able to save properly, others seem to just break upon doing things like opening maps.
Setups: 1.8.0_231-b11 with 247MB Total, 247MB Max - Does not save. (Desktop, RexyWood, 4GB) 1.8.0_144-b01 with 476MB Total, 3GB Max - Works fine. (Desktop, Mine, 16GB) 1.8.0_111-b14 with ?MB Total ? - Does not save, Cannot open maps. (Desktop, Kao, ?)