SpongePowered / Mixin

Mixin is a trait/mixin and bytecode weaving framework for Java using ASM
MIT License
1.41k stars 194 forks source link

OutOfMemoryError when compile java files at runtime #595

Closed MrMks closed 2 months ago

MrMks commented 2 years ago

Recently i'm writing a runtime compile mod so then I can add and remove functions on my server dynamically, via JavaCompiler provided by javax.tools.

When I testing the performance of the compiler, it ran into a OutOfMemoryError, which related to a map named instances in AnnotatedMixins.

It seems like a memory leak behavior, so is there any way to resolve this problem?

(English isn't my first language, sentences may looks strange, please just ignore it)

gabizou commented 2 months ago

It sounds like you're asking for a feature request for dynamic re-running of the annotation processor. We're not going to entertain a feature for the time being as our developer time is fairly limited as is.