In Java 15, the MethodHandles.Lookup class gained the ability to define hidden classes
By using this feature for our one-shot classloaded classes, like JIT methods, we should be able to reduce the memory overhead of each class, since they will not drag along a full classloader and all the metadata associated with a non-anonymous class.
This could also reduce metaspace usage and overall memory usage of JRuby when using JIT to compile Ruby code.
In Java 15, the MethodHandles.Lookup class gained the ability to define hidden classes
By using this feature for our one-shot classloaded classes, like JIT methods, we should be able to reduce the memory overhead of each class, since they will not drag along a full classloader and all the metadata associated with a non-anonymous class.
This could also reduce metaspace usage and overall memory usage of JRuby when using JIT to compile Ruby code.