TerraformersMC / ModMenu

A menu for, you guessed it, mods!
MIT License
475 stars 140 forks source link

Opening Mods list causes huge memory spike #727

Open SnipUndercover opened 2 months ago

SnipUndercover commented 2 months ago

Hi! I'm relatively new to modded Minecraft and I'm not sure whether this is the right outlet to report such an issue.

Opening the mods menu with around 44 mod .jars causes Minecraft to freeze, following a massive, more than three-fold increase in memory usage.

The following screenshots are taken while opening the menu in the title screen. Before: Memory usage before opening Mods menu: around 2700 MB

After: Memory usage after opening Mods menu: around 9200 MB

After Minecraft unfreezes and the memory spike is over, the JVM seems allocate 1GB more than before, idling at 3664 MB compared to 2693 MB. If allowed to reach the memory cap, the freeze and memory spike will take longer. (The client has access to 8 GB of ram via -Xmx8G; I have 32 GB installed)

On one occasion I have managed to cause Minecraft to crash due to a lack of available memory, but I cannot reproduce this again. Here's the crash log if it's of any use.