Davide
Davide

Reputation: 602

Java Spring Web Application starts slowly in debug mode

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.

Upvotes: 16

Views: 8367

Answers (3)

Nitish K
Nitish K

Reputation: 113

following steps can improve performance

  • Clean Tomcat Work Directory
  • Add/remove application from server>tomcat

I did improved a lot, speeds up debugging process.

Upvotes: 0

Nisarg Patil
Nisarg Patil

Reputation: 1639

Method entry-exit breakpoints or conditional breakpoints usually cause this issue. Removing those breakpoints would resolve the issue. It worked for me.

Upvotes: 3

Sean Patrick Floyd
Sean Patrick Floyd

Reputation: 298828

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

Upvotes: 74

Related Questions