Hello, My name is Divij and I am working on an application which requires concurrent script compilation with a high throughput.
I am using version 2.4.12 and currently, I am not able to achieve high throughput because the threads are waiting at the synchronized code block at [1]. I propose removing the synchronized block and changing sourceCache to ConcurrentHashMap (or maybe some other thread safe cache that can provide weak references). I would be happy to make this change and send a pull request if you think it is valid change to make. Regards, Divij [1] https://github.com/groovy/groovy-core/blob/master/src/main/groovy/lang/GroovyClassLoader.java#L266