Jason
Jason

Reputation: 4145

Need to Improve Startup Speed and Resource Usage on a Spring-WS Web Service

I have a Spring-WS web service that has three issues:

  1. Slow startup time
  2. Slow generation of the dynamic WSDL
  3. Heavy usage of PermGen (app has to be 1.6 compatible)

Currently, the spring-ws-servlet.xml file has several <context:component-scan> elements for autowired dependencies. Two of these scan nearly everything in two external libraries containing Hibernate DAO and Entity classes. Similarly, the Hibernate session factory bean scans a large number of entities from these two libraries.

So, my questions:

  1. Obviously, we would see at least some performance improvement by limiting the scope of the <context:component-scan> elements. But really, would it be that much?
  2. Similarly, would I see improvements by limiting the scope of what Entities are scanned by the session factory?

Making these changes will NOT be a quick process (alter code, test, etc). Therefore, if anyone can add their wisdom, I would greatly appreciate it.

Upvotes: 0

Views: 146

Answers (1)

Marek Raki
Marek Raki

Reputation: 3166

Actually I am developing a spring ws application on Google Cloud and I also have the same problem with slow start up time. The biggest difference that I have notice was when I have moved to aspectj compile time weaving using aspectj-maven-plugin. If you haven't done this yet try this one. The result may be vary depends on your code and deployment environment. On the cloud every file operation is much slower so this may be a reason why this work for me so well.

Upvotes: 1

Related Questions