Open
Description
Painless currently creates a unique classloader for every compiled script. Since Java 15 the JVM has supported hidden classes, a way to load a dynamically created class at runtime without needing a new classloader. Painless should replace it's Loader with loading a hidden class.
See apache/lucene#12873 for how Lucene did the same thing for the expressions Javascript compiler there.