tags:

views:

352

answers:

1

I got rather large GWT application. Opened in several Firefox tabs, it eats huge amount of memory. The first ToDo thing is to minimize number of widgets created in UI.

What instruments do you use to control memory usage of application, show a number of widgets in the page or do general profiling?

+1  A: 

I do not know of any tools that will do memory profiling of a Javascript application right now, but hopefully someone can correct me.

As for general profiling, I use the Firefox Firebug plugin and when I need to see exactly how Internet Explorer is failing me, the IE8 developer toolbar also has a good profiler. Both of these let you see method calls and the amount of time spent in various areas. Both also let you traverse the DOM to get an idea of how much you currently have attached.

I highly recommend compiling your application with the 'pretty' GWT option otherwise the profilers will show a number of obfuscated method names which won't help you overly much when you do isolate hotspots. I rambled a little bit about it here but be wary of running a Java profiler on your application in hosted mode. If you have algorithmic problems, they might turn up there, but Javascript engines tend to be optimized in different ways than the JVM.

bikesandcode
I use both Firebug and Memory Profiler in FF. 'pretty' option is a good tip, thanks.
Alexander Vasiljev