Question: I have noticed a high memory and CPU usage during mvn-gwt operation especially during compile phase. Memory usage just soars. I just wanna know if this is normal and if anyone else is experiencing this. 

My current JVM setting is `-Xms64m -Xmx1280m -XX:MaxPermSize=512m`

![Memory usage during GWT Compile](https://i.stack.imgur.com/KGqCy.png)

Answer: 
I think it's normal. Because the phase of compilation in GWT is really very resource-intensive. GWT provides a larger library (in gwt-user.jar) that must be analyzed during compilation and a number of compiler optimizations that require much memory and processing power. Thus, the GWT compiler use much memory internally.
The GWT compiler has a localWorkers setting that tells it how many cores to use. The more cores, the more memory it will use. If you are using the Eclipse plugin it defaults to just using one (I believe). But the Maven plugin defaults to using all core on your machine (ie if you have a quad core, it will use `localWorkers 5`.

Interestingly I've been following the advice found here: <http://josephmarques.wordpress.com/2010/07/30/gwt-compilation-performance/> which says that `localWorkers 2` is an ideal setting for memory usage and speed. That way my machine doesn't lock up during the compile, and the speed difference is very minor.