Skip to content

optimize asm transformer#176

Open
danyadev wants to merge 9 commits intomasterfrom
java-asm-transformer
Open

optimize asm transformer#176
danyadev wants to merge 9 commits intomasterfrom
java-asm-transformer

Conversation

@danyadev
Copy link
Copy Markdown
Member

@danyadev danyadev commented Feb 21, 2026

Optimized transform time in the full pack from 850ms to 100ms

Tested in the full pack, confirmed that every transformer works

@Nikolay-Sitnikov Nikolay-Sitnikov self-assigned this Feb 22, 2026
Comment thread .editorconfig
@danyadev danyadev changed the title rewrite asm class transformer to java optimize asm transformer Mar 5, 2026
@danyadev danyadev force-pushed the java-asm-transformer branch from 0edf80f to 2c6124f Compare March 14, 2026 11:46
@danyadev danyadev requested a review from Alexdoru March 14, 2026 11:51
@danyadev danyadev force-pushed the java-asm-transformer branch from 2c6124f to 252a6ba Compare April 6, 2026 10:26
@OvermindDL1
Copy link
Copy Markdown

OvermindDL1 commented Apr 8, 2026

Huh, this looks cool, it's also impressive how bad it was before, lol...

Didn't know about ClassConstantPoolParser in gtnhlib, I need to remember that, cheaper than parsing things each time and I bet this is where the majority of the performance improvement comes from.

The recursive check in isTileEntity before wasn't great either, iteration is better here.

The copyMethodNode I really like here, previously it... looks like it was putting MethodNode objects from a template being inserted directly into multiple classes? Which I'm pretty sure was violating some invariants... o.O

Also looks like it checks class implementations now for interfaces instead just dumb stripping, much nicer!

The more conversion from scala to java is simple enough for this, probably more maintainable by people into the future, lol.

(Really though, that prior code was... not great? Good PR!)

Copy link
Copy Markdown
Member

@Alexdoru Alexdoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are adding GTNHlib as a dep can you also make each transformer dump the classes when a debug flag is set ? like it does in hodgepodge, gtnhlib and angelica

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

Successfully merging this pull request may close these issues.

4 participants