tags:

views:

58

answers:

2
+1  Q: 

WAR optimization

We are using GWT Eclipse tool for developing a web application in JAVA and Lightsreamer (third party software) for login purpose and for data streaming.

It takes around 6 mins to load page and about 2 mins to login in production environment.

Previously the Browser folder(WAR) size was 70.5MB. So it was reduced by removing some folders like Web-INF, js, pieces and some files of SC(Deleted subfolders in SC are modules, modules-debug, system) and some files of SmartG and also even optimized the images in Image folder.

And now Image folder got reduced from 40KB to 17KB.

Now the total size of WAR is 15.6MB. It is also works. But now too it takes long time to load the page. Kindly advice us how we need to optimize WAR folder and suggest the way of optimizing.

+1  A: 

The first thing to do is analyse your client application HTTP requests to your webserver using HTTP monitoring tools like Firebug

http://getfirebug.com

Frederic Conrotte
Agree. You need to know where the time is actually spent.
Thorbjørn Ravn Andersen
Even better - use [SpeedTracer](http://code.google.com/webtoolkit/speedtracer/) (it's got extensive GWT support - or at least that's what [a presentation](http://code.google.com/events/io/2010/sessions/measure-in-milliseconds-speed-tracer-gwt.html) on Google IO led me to believe ;))
Igor Klimer
A: 

Deleting Stuff in your WAR has not impact on the perfs. It's not like the browser loads all that stuff. If after deleting all the garbage, your application still works like before, then that means those was useless.

Now, about your actual issue, as other told you, you should watch where the time is spent. Firebug can be of a good help in that because you will see (Net tab) how long each request takes. Also, speedTracer is a great tool when using GWT because you see exactly where the time is spent. And it can even display you the time spent on the server side!

also some tips :

gwt should compile to obfuscated JS, not pretty or whatever make sure your images are not too big and loaded only when necessary => image bundle anyone? compress your css + external JS (yuicompressor) Have a good caching policy (far futur for gwt stuff since the names are generated)

and lot of others....

Thomas