Tuning Intellij Idea

First of all consider changing idea.vmoptions.
idea.vmoptions is a text file with a list of JVM settings, it’s usually found in the bin folder in the Idea installation folder. This file can be open in any text editor.

The following settings increase performance drastically on Sun JVM 1.6:

-server
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-XX:CMSIncrementalDutyCycleMin=0
-XX:-TraceClassUnloading

Notice, that I enabled concurrent mark-sweep GC (in theory it’d be faster than others on 1.6) and aggressive optimizations as well as server JVM and I don’t use assertions (no `-ea’ switch).

I tested these on x86 linux with Idea Community edition of build 111.69

As for appearance I’d suggest using Nimbus theme (Settings -> Appearance -> Look and Feel).

That’s how idea looks on my Ubuntu:

Idea 11 Community Edition on Ubuntu

Full screenshot is available here.

P.S.: For Mac OS X users:
There is no idea.vmoptions file on Mac OS X.
In order to modify the mentioned JVM settings, you’d go to the application’s package contents, then open the inner “Contents” folder and then open Info.plist (just click on it and the standard plist editor will be opened). In the opened plist editor consider changing Java > VMOptions key as given above.
You may copy-and-paste the following value I use on my Mac laptop:

-Xverify:none -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -XX:+CMSClassUnloadingEnabled -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:-TraceClassUnloading -Xbootclasspath/a:../lib/boot.jar

Note, that you may want to make Idea start in 32-bit mode to reduce the memory consumption and increase the overall IDE performance. Just ctrl-click on the application icon in the “Applications” folder and click on the checkbox “Open in 32-bit mode”.

After doing so Idea starts in 1 (ONE) second or so on my Mac Book Pro!

P.P.S:
You have to edit idea64.vmoptions if you’re running idea in 64-bit mode (thanks to Rudy for noticing this).

4 thoughts on “Tuning Intellij Idea

  1. I want you not to forget that for a idea running under a 64 bits os/jdk we have to use idea64.vmoptions. I did a strace of the idea process and I confirm that it is the file that is used (at least on ubuntu).

  2. >> Rudy wrote:
    >> .. skipped ..
    Yes, you’re right, thank you.

    I’ve noticed a tangible performance lags when running “heavy” java applications such as Intellij on my laptops in 64-bit mode, not to say a greater memory consumption. So I didn’t ever considered this option :)

  3. Thanks a million … Info.plist had -Xverify:none under but not for .x86_64 … after your advice IDEA opens really fast … I guess -Xverify was ignored without the specific VM dict statement …

    Also I’ve noticed that IDEA will crawl on startup if you have uncommitted changes in vcs … I’m using git but I’d imagine it has to do with maintaining a work-tree index for all diffs in git …. committing before closing increased start-up speed about 400%

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>