Monday, January 28, 2008

Memory Settings for IntelliJ

By default IntelliJ is setup to use a maximum of 192 MB of heap. The JVM memory settings are as follows:

-Xms16m -Xmx192m -XX:MaxPermSize=92m

I have found this to be almost always too low, systematically resulting in OutOfMemoryError. So every time I install a new version of IntelliJ, the first thing I do it to change this setting with:

-Xms16m -Xmx392m -XX:MaxPermSize=92m

If you are on a Mac, you can do this by editing the following file* and searching for -Xms in the file:

/Applications/Selena-7670.app/Contents/Info.plist

* Replace Selena-7670 with the name of your the IntelliJ executable, which, if you are using regular releases instead of EAP builds, will look more like IntelliJ IDEA 7.0.