How to reduce the cold start time of a Spring MVC application?

I switched from checking the controller class classes to explicitly declaring beans, but wondered what else I could do to shorten the initial launch of the Spring MVC application.

+4
source share
1 answer

Without knowing the specifics of your project, I would say that it is best to profile the launch of your Spring MVC application.

  • You can do this using %JAVA_HOME%\bin\jvisualvm.exe from Sun JDK if that is what you are using.
  • Netbeans has a good article on profiling a Java web application.
  • If you are working on an open source project or have money, you can use YourKit .

Have you ever done profiling? You should start profiling when your particular webapp starts loading and stops when it is done, if you know its web application that causes a slowdown.

Otherwise, you must profile the entire web container / application server from launch to launch.

+1
source

All Articles