简体   繁体   中英

WAR File too big

I have deployed my WAR file to Tomcat, but it's almost 160 MB and server is running really slow. Can any one suggest to me how to speed up things up?

Why is that necessarily a problem? If you have a lot of 3rd party JARs your WAR file might be that large. What can you remove and still have the app run?

If we assume that size is not necessarily the reason why your app server is slow, what could be the root cause?

I'd recommend monitoring your app server under some moderate load using Visual VM with all the plugins installed. It'll show you what's happening with heap, CPU, threads, object creation, and lots of other interesting things.

I'd also turn on Chrome tools and see what's happening when pages are loaded and rendered.

Have you run YSlow! to see how your pages perform?

You don't have root cause for slow. I'd find it before I guessed.

Update - Just a point of reference: I have a web app that uses Spring 3, all its dependencies, and several other 3rd party JARs. The WAR file is 31MB. You might have a problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM