spring项目加载非常慢

  1. 请检查spring是否运行在debug模式下,是跳转到2 否则跳转到3

  2. 查看spring在run模式下是否运行依旧缓慢 是跳转到3,否则跳转到4

  3. 请检验是否spring bean加载了多次(quartz加载很有可能导致部分bean被是实例两次) 是跳转到 http://blog.csdn.net/chaijunkun/article/details/6925889 否则跳转到 http://jinnianshilongnian.iteye.com/blog/1883013 按照步骤检验

  4. 请将代码中所有代码断点禁用掉或者全部删除重新进入到debug模式下查看加载速度是否变快 


发现debug模式下可能导致应用启动速度大幅度变慢。将breakpoint删除后我的应用从 171021ms+43824 ms=====》13021ms+2950ms

解决方案:stackoverflow

i have a java web application, using Spring, Jersey (jax-rs) and Hibernate.

It runs fine and fast, but there are 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 init
INFO: 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 did to reduce performance..

Thanks a lot for help! Davide.




One thing that's helped me in a similar situation is 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

转载于:https://my.oschina.net/qixiaobo025/blog/344119

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值