gwt compile need lot of heap memory
-
27-09-2019 - |
Question
In order to gwt compile permutation, i need to use -Xmx1824m -XX:+UseParallelGC or else, i will get error out of heap memory. what is the optimum extra java parameters that you folks use for
case 1:faster compilation
case 2:lesser consume memory but slower compilation?
can share your jvm parameters?
Solution
We have a relatively large GWT application code base (few 100K lines) which we compile with i18n (extra permutation per language per browser permutation). Running it with -Xmx1024m
is fine. What you might want to do is boost your PermGen
size. That is what get's used when GWT compiles the Java into Javascript. You can do this by adding -XX:MaxPermSize=1024m
.
Also, if you want faster compile, you can tell GWT to compile more than one permutation at a time. Usually you set this to the number of cores on your processer + 1. So, on a Core2 Duo, you would set the number to 3. You can do this by setting the GWTC.WORKERS
property in your build.xml
if you are using ant
.