:
Skip Navigation
Resources Blog How JVM Settings Affect Flexmojos Performance

How JVM Settings Affect Flexmojos Performance

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:

$ 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.

Picture of Marvin Froeder

Written by Marvin Froeder

Over the past 11 years, Marvin has worked for several startups, most notably at The Last Pickle, ContaAzul, and Sonatype, where he was a Java Developer.