On Java 10+, you can use application class-data sharing to reduce launch times, response time outliers, and memory footprint. By archiving class data with -Xshare:dump and loading it with -Xshare:on, the JVM's class loading workload can be reduced considerably.
Letting Caliz store native images and only create them for a given Java "script" (single source file) if needed
Extending Caliz to create native images of Java "scripts" (single source files) with with Graal
First steps toward an acceptable scripting experience with single-source-file execution and Graal native images
Want to load test your web app? Then you should know about Apache JMeter! This JMeter tutorial explains the basics and how to create & execute a test plan.
Another post about stream performance - this one implements your ideas about how else to approach the topic.