IntelliJ IDEA 12 Compiler. Twice as Fast

If you haven’t tried the latest version of IntelliJ IDEA yet, there is at least one important reason to do it. While most of the excitement around the new release has to do with Darcula, the new dark look and feel, the most thrilling feature of IntelliJ IDEA 12 is its brand new compiler.

As we mentioned earlier, the new compiler is much faster and provides new options that were previously unavailable.

On the chart below you can see a comparison of compiler performance in IntelliJ IDEA 12 and IntelliJ IDEA 11. In this test we have measured the time of a complete rebuild of IntelliJ IDEA Community Edition project. As you can see, IntelliJ IDEA 12 is more than twice as fast as the previous version.


Note also the third column, called Parallelized. This is a new compiler option which allows you to use more than one core for building a project. In this case the compiler runs for multiple independent project modules in parallel. Since each compiler thread uses file system, the benefit of parallelizing highly depends on how fast you hard drive is. Still the average gain in performance is spread between 10 and 20 percent for large projects.

Automatic Make

One more exciting compiler option added in IntelliJ IDEA 12 is automatic make. This is another time-saver, which triggers project make automatically on every change. Since the compiler runs in a separate process, it is able to compile modified files in the background, while you are doing something else. This means your project is in compiled state all the time, so you don’t need to wait any time you want to run it.

Compiler Settings

All compiler settings are available via Settings → Compiler. At the moment automatic and parallelized compiler options are disabled by default, so you need to enable them manually via Make project automatically and Compile independent modules in parallel correspondingly.

We hope you’ll enjoy the faster compiler and become even more productive with IntelliJ IDEA 12. Feel free to share your feedback with us on the discussion forum and in our issue tracker.

Stay tuned for more details about new features in our blog.

Develop with Pleasure!

Comments below can no longer be edited.

22 Responses to IntelliJ IDEA 12 Compiler. Twice as Fast

  1. Avatar

    Geoffrey De Smet says:

    December 12, 2012

    Nice work!

    Are there any plans to support “running a module despite compile errors”? If any of the uncompiled classes are run, the process terminates. In some types of refactors (shotgun surgery for example) this can be very handy to check if the code you’ve already written actually runs to a certain point, while you still have compile errors in classes that get run later. Eclipse supports it.

  2. Avatar

    Tropper says:

    December 12, 2012

    So far IDEA 12 is pretty amazing. Prior to version 12 IDEA was sometimes a little laggy which was really annoying. So moving the compiler in its own process really seems to helped a lot making IDEA more responsive without losing any of its great features.

    Great work guys!

  3. Avatar

    Brice says:

    December 12, 2012


    Eclipse wrote their own compiler to support that. The brand new IntelliJ 12 compiler feature, includes support for the standard Javac compiler (which was already there) and the Eclipse compiler (which is new in this version).

    The eclipse compiler setting offer additional settings like “proceed on error”, which allows to continue the compilation on error as the Eclipse compiler documentation says. However there’s some catch at the moment :
    – you’ll see the benefit only on a full rebuild
    – you still can’t run classes of a project in error, even if the class and his dependencies compiles (at least not in a maven project)

    @IntelliJ team : It might be interesting to try what the setting -Xmaxerrs/-Xmaxwarns has to offer regarding “multiple” compilation errors.


  4. Avatar

    Andrey Cheptsov says:

    December 12, 2012

    Eclipse compiler has been supported in IntelliJ IDEA since 6th version.
    At the moment we are considering adding it for both Eclipse and Javac. It might appear in 12.1 or even earlier.

  5. Avatar

    Brice says:

    December 12, 2012

    @Andrey Ouch Indeed I’m wrong, I believe I made the mistake as I was thinking about incremental compilation because I remember a plugin that was using the Eclipse compiler to enable it.

    At the moment we are considering adding it for both Eclipse and Javac. It might appear in 12.1 or even earlier.
    > Even cooler


  6. Avatar

    Darren S. Eyers says:

    December 12, 2012

    Well done!
    Really happy to see performance was a big part of version 12 and why we put a big purchase order in! Not much else we need.

    Hope this continues.

    Would like to see:
    1. more performance improvements (top priority)
    2. tiles support (e.g. click in struts 2 xml files)
    3. references showing when Java code has references in *.jsp and *.jspf files
    4. Maven pom window like you have in Eclipse where you can add/remove jar, specify version and shows jar dependency tree

  7. Avatar

    Peter says:

    December 12, 2012

    Will external compiler mode work for mixed java/scala projects imported as Maven projects anytime soon? I always get errors when I try this, works great on java only projects…

  8. Avatar

    m.milicevic says:

    December 12, 2012

    @Darren S. Eyers
    3. is supported several years (you need to use @elvariable comments though, otherwise it is of course not possible)
    4. is also there for a few years…(while in pom choose Diagrams > Dependencies). Adding dependencies, is also possible (even from java code):

  9. Avatar

    Xav says:

    December 12, 2012

    Sorry to be not enthusiast, but IDEA 11 was also able to do achieve such performance by using the javac in-process compiler (which has been removed in IDEA 12 replaced by the external build ?).
    I do the bench on my own computer (Core i7 2.8Ghz Windows 7):
    IDEA 11 (javac in-process compiler) : 3m02s
    IDEA 12 (external and parallelized module build activated) : 3m11s
    Could you precise how did you the bench with IDEA 11 ?

    Moreover the new compiler cause problem with flex compilation
    I hope this one will be fixed soon in order to be able to enjoy the other real improvements of IDEA (ie true Maven 3 support)

  10. Avatar

    Jeff Olson says:

    December 12, 2012

    On our project we’re seeing a decrease from around 2:00 for a full rebuild to about 1:30, or a 25% decrease in the time. This is for about a Java project that is about 400,000 LOC.

  11. Yann Cebron

    Yann Cebron says:

    December 12, 2012

    @Darren S. Eyers: Tiles is supported since long time ago, also in Struts 2. Please see plugin documentation: http://confluence.jetbrains.net/pages/viewpage.action?pageId=35367

  12. Avatar

    Ahmet A. Akın says:

    December 13, 2012

    A small side note, it is nice to see Linux is the king of the hill when it comes to parallelism. Even with inferior hardware.

  13. Avatar

    Mateusz Szczap says:

    December 13, 2012

    I actually find IntelliJ 12 to be slower. There are lags while typing code and overall performance of IntelliJ editor has DECREASED.

  14. Avatar

    Andrey Cheptsov says:

    December 13, 2012

    Could you please submit an issue with more details? http://youtrack.jetbrains.com/issues/IDEA

  15. Avatar

    Andrey Cheptsov says:

    December 13, 2012

    Could you also please try to add more heap memory to the compiler and check it once again? Just to know if it’s not enough.

  16. Avatar

    Anand says:

    December 13, 2012

    I am not sure if this is the right place to ask. I am using IntelliJ Idea12 Community edition.
    The problem I m facing is : Syntax errors are not getting highlighted in Code Editor (it ideally should do and it DOES also, by default, as I found on answers on some forums).
    But that is not happening in my case. I am really not able to figure out the root cause yet.
    I am able to see compilation errors in message window ONLY AFTER I Compile my project.

    Any help would be greatly appreciated.

  17. Avatar

    Mihai says:

    December 13, 2012

    Any documentation on how to make a plugin’s compilers integrate well with this ?

  18. Avatar

    yubafu says:

    December 18, 2012

    how to use Parallelization feature ?

  19. Avatar

    Alexander Ashitkin says:

    January 17, 2013

    Without mocking hdd with in memory stroage such benchmark is useless. Need diferent benchmarks for HDD, SSD, in-memory caches and uputput

  20. Avatar

    santosh says:

    February 13, 2013

    i did not like the option always gives me outofmemory exceptions(Even though i increase groovy compiler memory) while compiling groovy classes.

  21. Avatar

    Peter Gromov says:

    February 13, 2013

    santosh, the problem with Groovy compiler memory management has been fixed in the just published IDEA 12.1 EAP, please try it from http://confluence.jetbrains.com/display/IDEADEV/IDEA+12.1+EAP

  22. Avatar

    Kostas Kougios says:

    June 4, 2013

    In my workstation, with 16 cores, in a multi-module java/scala project, I sometimes get “waiting for free compiler”. Is there an option to configure more “free compilers”?

Discover more