fabric-loader icon indicating copy to clipboard operation
fabric-loader copied to clipboard

Don't initialize MappingResolver for access widener load

Open altrisi opened this issue 3 years ago • 2 comments

This PR prevents access widener load from initializing the MappingResolver just to get the current runtime namespace.

Initializing the MappingResolver causes all mappings to be loaded into memory (if they weren't already, currently they are in earlier init, see #694), but access widener doesn't use anything from them, just the current runtime namespace, that comes from FabricLauncher directly.

altrisi avatar Jul 12 '22 11:07 altrisi

I know this doesn't fix the initialization of the actual maps (it's mentioned in the PR body), but it does prevent initializing MappingResolver, that if the issue with MappingConfiguration was fixed would initialize mappings too (with the current impl), when it's not actually needed.

altrisi avatar Jul 12 '22 15:07 altrisi

I eventually want it to initialize only the headers and lazy init the actual mappings - this may require mapping-io though, which has a few other challenges..

Player3324 avatar Jul 12 '22 16:07 Player3324

Change looks fine, https://github.com/FabricMC/fabric-loader/pull/812 cleans this up a lot but for now this is better 👍

modmuss50 avatar Oct 03 '23 09:10 modmuss50