-
Bug
-
Resolution: Works As Intended
-
None
-
Minecraft 1.13.2
-
None
-
Unconfirmed
Don't know if this still happens but, it appears to be a bug for a long time now there is a memory leak with the LaunchClassLoader.class. For newer versions it's probably still exists just under a rafractored name fix it. It's heavy on ram for no reason.
Java Class Loaders General: shouldn't be storing classes in memory. If you want to print transformed classes do so at the end of the transformers running not mass cache it.
Issue: LaunchClassLoader#resourceCache && LaunchClassLoader#cachedClasses both store classes in maps. One is obfuscated only and one is Transfomred class cache. This makes memory usage go way up for class loading. Load 1k classes by default it's now equal to 3k classes for additional libraries and mods this breaks anybody's ram The package is net.minecraft.launchwrapper
There is never a reason to keep the classes loaded into a map jvm keeps track of that. If you don't store the class files it will transform multiple times? No it doesn't I replaced the class and tested myself it only fires that class one time with no maps. Pure Java examples also specify nothing about storing your own class arrays. Anything you heard from that is confirmed false in java 8 and probably also java 7 and maybe java 6