Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into reducing memory usage of FMLDeobfuscatingRemapper? #27

Closed
bs2609 opened this issue Jan 20, 2017 · 2 comments
Closed

Look into reducing memory usage of FMLDeobfuscatingRemapper? #27

bs2609 opened this issue Jan 20, 2017 · 2 comments

Comments

@bs2609
Copy link

bs2609 commented Jan 20, 2017

This is just a suggestion, apologies if this is not the right place for those.

One of the things I saw to be using a reasonable amount of memory in heap dumps is the FMLDeobfuscatingRemapper class (80-90 MB heap retained). This stores all the mapping data for deobfuscation, but the only thing that I saw using it at runtime (after loading is complete) is ObfuscationReflectionHelper, which, on inspection, doesn't appear to do anything that ReflectionHelper wouldn't work for (everywhere that Forge uses it passes both MCP+SRG names anyway).

I think it may be possible, after loading is finished, to reflectively empty the various collections stored by FMLDeobfuscatingRemapper and then just redirect calls from ObfuscationReflectionHelper to equivalent ReflectionHelper methods. However, I'm not sure, so I'd appreciate your views on this suggestion.

@asiekierka
Copy link
Owner

I'm afraid not - Minecraft classes are not entirely loaded by the time the game is loaded, and this behaviour is generally unpredictable - what if a class gets unloaded?

@bs2609
Copy link
Author

bs2609 commented Jan 20, 2017

Yeah, that would be a problem, nevermind that then.
Thanks for looking at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants