How to improve the performance of loading java source file using scripting api

Hi team,

My project is heavily using the scripting API to enable flexible extention.
Considering execution performance, we choose java but not groovy as script language.

The startup of my project will scan and load all jave source file, but it took much time.
I’ve tried to parallelly load but seems it become slower.

Is there any way to improve the performace? like keep the compiled java class somewhere, and clear them programatically when neccessary?

Please kindly advise, thank you