Spring Project loads very slowly

Source: Internet
Author: User

    1. Please check if spring is running in debug mode, jump to 2 otherwise jump to 3

    2. To see if spring is still running slowly in run mode is jump to 3, otherwise jump to 4

    3. Verify that the spring bean has been loaded multiple times (quartz loading is likely to cause a partial bean to be an instance two times) to jump to http://blog.csdn.net/chaijunkun/article/details/6925889 Otherwise jump to http://jinnianshilongnian.iteye.com/blog/1883013 follow the steps to verify

    4. Please disable all code breakpoints in the code or remove all of them and re-enter into debug mode to see if the loading speed is getting faster


Discovery of debug mode may cause the app to start significantly slower. Remove breakpoint after my app from 171021ms+43824 ms===== "13021ms+2950ms

Solution: StackOverflow

I have a Java Web application, using Spring, Jersey (Jax-rs) and Hibernate.

It runs fine and fast, but there is some days it takes a big amount of time to initialize in debug mode only and when it Starts is really slow ...

I ' m using Eclipse 3.6, Apache Tomcat 6 and Java 1.6.0_29 for MAC OS x.

Application begin to log slow after writing this log line:

info:initializing Spring Root Webapplicationcontext

And before this log lines:

30-dic-2011 10.51.25 com.sun.jersey.api.core.PackagesResourceConfig initinfo:scanning for root resource and provider Classes in the Packages:com.example.project.web.rest

How can I investigate? Any suggestions?

Unfortunately I really don ' t know what I do to reduce performance.

Thanks a lot for help! Davide.




One thing that's helped me in a similar situation are to delete all breakpoints in Eclipse. It ' s worth a try.

Http://stackoverflow.com/questions/8678409/java-spring-web-application-starts-slowly-in-debug-mode

Spring Project loads very slowly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.