Java Spring Web 应用程序在调试模式下启动缓慢
我有一个 java web 应用程序,使用 Spring、Jersey (jax-rs) 和 Hibernate。
它运行良好且快速,但有时仅在调试模式下初始化需要大量时间,并且启动时速度非常慢...
我正在使用 Eclipse 3.6、Apache Tomcat 6 和 java 1.6.0_29 MAC OS X。
,应用程序开始记录缓慢
INFO: Initializing Spring root WebApplicationContext
在写入此日志行之后和在此日志行之前
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
:我该如何调查?有什么建议吗?
不幸的是,我真的不知道我做了什么来降低性能。
非常感谢您的帮助! 达维德.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在类似情况下对我有帮助的一件事是删除 Eclipse 中的所有断点。值得一试。
One thing that's helped me in a similar situation is to delete all breakpoints in Eclipse. It's worth a try.
方法入口-出口断点或条件断点通常会导致此问题。删除这些断点将解决该问题。这对我有用。
Method entry-exit breakpoints or conditional breakpoints usually cause this issue. Removing those breakpoints would resolve the issue. It worked for me.
以下步骤可以提高性能
我确实改进了很多,加快了调试过程。
following steps can improve performance
I did improved a lot, speeds up debugging process.