How JVM Settings Affect Flexmojos Performance


October 19, 2009 By Marvin Froeder

Flex compiler does use lot’s of memory and CPU resources, so does Flexmojos. There’s not much new in here.

Some time ago I was reading this blog post with some memory parameter suggestion. And guess what, compilation becomes faster using it.

There are 2 ways to change maven JVM settings:

1 – Editing launch files

Edit mvn (non-Windows) or mvn.bat (windows) and add the following line:

1
$ set MAVEN_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:PermSize=64m

On Windows you can add that on the first line and on non-Windows systems you must add that after “#!/bin/sh”

2 – Setting an environment variable

This process will vary from OS to OS.
Just add an environment variable with name equal to “MAVEN_OPTS” and the value equal to “-Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:PermSize=64m” both w/o quotes.

The main advantage for the second method is that it will still work even after Maven is updated.