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

Stop running mod classes through mixin to improve classloading speed.

Open modmuss50 opened this issue 3 years ago • 3 comments

Id suggest possibly adding an opt-out option to allow mods such as the lang loaders to skip mixin's transformers, should in theory save a bit of speed.

Right now mixin will be transforming every mod class (including the language adapters). Needs testing to make sure its actaully worth it.

modmuss50 avatar Jan 14 '21 19:01 modmuss50

If I'm reading this right, the mod that wants to mix into another mod needs to opt-in.
How would we specify that? Do we just stick a

"iWantToMixinIntoTheseMods": ["mod1", "mod2", "mod3"]

in the fabric.mod.json?

Leo40Git avatar Jan 14 '21 19:01 Leo40Git

It would have to be an option to allow any mod to mixin its self (Should it pass through mixin or not). It would still get transformed by loader's internal transformers.

modmuss50 avatar Jan 14 '21 19:01 modmuss50

@modmuss50 Aren't mixins class-specific? If the classloader is just looking up relevant mixins in a map, I fail to understand why classloading speed is slow.

liach avatar Jun 16 '21 01:06 liach

I dont believe this is a major bottleneck in classloading speed. I should have benchmarked this before creating the issue.

modmuss50 avatar Feb 05 '23 21:02 modmuss50