Enigma
Enigma copied to clipboard
Reduce memory usage
Is there any way to reduce memory usage other than doing code optimization, like maybe some java arguments? I'm feeding 14GB and still can't get through to finishing decompilation for the server.
Not sure how the decompilation works, but it seems to keep everything on the memory. Any way around this like maybe skipping already decompiled files?
Thanks in advance!
PS: Using Procyon decompiler apparently used less memory, managed to finish the same decompilation using only 10GB.
Hmm, maybe a heap dump is needed to examine what is using the memory
I've had similar problem decompiling Minecraft client 1.17.1 along with Mojang/Microsoft's provided ProGuard deobfuscation mapping file. With default Java params I got "out of memory", same with -xmx 4GB. When this happens, you only get hint in the console. The program just look like it's continuing to crunch, my 16 threads are at approx 80%, but the progress bar no longer advance.
I upped -xmx to 16G (-xms4096M -xmx16386M) and it went through really fast without error (I have 32G).
Once this happens, I can not stop the program, ctrl-c on console does nothing, and kill does not work (have to kill -9).
This is on Ubuntu 20.04, enigma-swing-1.4.1+local-all.jar
Regards, Eric
Why do you want to decompile the client using Enigma? You can use the genSources task from Fabric Loom, it's less memory intensive because it does only decompilation instead of having Enigma's overhead of indexing the entire code, if you want to use it for reference while developing mods.
Why do you want to decompile the client using Enigma? You can use the genSources task from Fabric Loom, it's less memory intensive because it does only decompilation instead of having Enigma's overhead of indexing the entire code, if you want to use it for reference while developing mods.
It's a function exposed in enigma's menu.
Why do you want to decompile the client using Enigma? You can use the genSources task from Fabric Loom, it's less memory intensive because it does only decompilation instead of having Enigma's overhead of indexing the entire code, if you want to use it for reference while developing mods.
That tool would probably be better suited. I just used the first tool I found from a Youtube video "how to decompile minecraft". I'm kind of newbie here :-)
I traced Enigma and there doesn't seem to be any leak. Just a very high usage of hash maps, certainly from the size of Minecraft.
This was with compiling on Java 16 btw.
Regards
I'm giving Egnima 16GB of memory but it still thorws OutOfMemoryException
Should be fixed as of https://github.com/FabricMC/Enigma/pull/448, I think this issue can be closed