-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Inability to get all classes targetted by mixin #661
Comments
No, Mixin only parses the classnode if it needs to modify it. You never need to parse the node yourself. Look at fabric's implementation. |
That doesn't seem to be the case.
|
You don't interact with that, you interact with https://github.com/SpongePowered/Mixin/blob/master/src/main/java/org/spongepowered/asm/mixin/transformer/IMixinTransformer.java |
Yes but I do use IMixinTransformer. However the exposed methods, either take in a ClassNode or take in a byte array, which is then parsed into a ClassNode. Checking the transformClassBytes method in MixinTransformer, leads to a call to transformClass which in turn calls readClass which parses the ClassNode. Unless I am missing something. Mixin/src/main/java/org/spongepowered/asm/mixin/transformer/MixinTransformer.java Line 191 in 41a6885
Mixin/src/main/java/org/spongepowered/asm/mixin/transformer/MixinTransformer.java Line 232 in 41a6885
|
There has been no response on this for a week. Anything new? |
I'd not be worried - it is quite usual for issues to go silent in an issue tracker. And you shouldn't really expect a rather fast development cycle for Mixin so it might take a long time till it gets resolved. |
While developing a mod loader as a side project for fun, I run into the following issue:
Mixins requires a class node, which means that all classes passed through to it, need to be parsed at runtime.
After some performance testing, I found out that that increases classloading times by a large enough amount to have me concerned(an average of 0.5s on my machine, when starting up minecraft through the loader).
So I thought: "That's no big deal. I'll just ask mixin what classes it targets, so I may only parse them if required".
However, after looking around, I can't seem to find any public API in mixin, that allows getting the classes targetted by mixin, or whether a specific class is a mixin target. Looking at the MixinConfig class, the required methods do exist, however they are package private.
And so I'd like to know: is there any way to do that? If not could a feature like this be implemented?
The text was updated successfully, but these errors were encountered: