2007/10/17

IntelliJ IDEA Performance

There're some concerns about IntelliJ IDEA Performance. And here is the tips that I used to make mine run fast. Some of them come from my own experience, some of them come from the know-everything internet.

  • Make sure you have all your libraries on your local harddrive (as opposed to mounted network drive). After I moved all my libraries from a network drive to local harddrive, the time for a 'make' on the project is reduced from around 60 seconds to just 5-7 seconds!
  • Defragment your Disk and reboot your computer. IDEA creates lots of small files and too much fragmentation is a nightmare.
  • Turn off Anti Virus completely. Yes I mean completely. It affects the performance dramatically.
  • Turning off Local History or even reducing the number of history days improved the performance significantly.
  • Adjust VM settings. Here is my idea.exe.vmoptions file (on windows):
-Xms512m
-Xmx512m
-XX:MaxPermSize=99m
-ea

Change it as you see fit per your hardware configuration.

More information is available at http://blogs.jetbrains.com/idea/2006/04/configuring-intellij-idea-vm-options/.
  • The Debugger in IDEA may work slowly if the Force classic VM option is not selected in the File Project Properties Debugger dialog. Using Method Breakpoints may also slow down the debugging process. I had two breakpoints on the method name instead of the first line of the method. It was taking a half hour to get to the breakpoint Changing these to line breakpoints gave me two orders of magniture
  • You may notice IDEA hang for several seconds when you switch to it from other applicationDisable Settings General Synchronize files on frame activation.
  • Disable windows paging file if you have enough memory. Get more memory if you don't have enough. Swapping is a performance nightmare.
  • Turn off windows indexing services, either set it to Disabled or Manual unless you do lots of file system search (even you do, I recommend Google Desktop Search). IDEA use lots of small files so background indexing can have a big negative effect on it's performance.
  • Control Panel/System/Properties/Advanced/Visual Effcts, Adjust for best performance. Unless you're willing to sacrify performance for visual effects like windows animation, fading/sliding etc.

5 comments:

Alexander said...

Interesting blog ... any idea what the problem with the method breakpoints is? Using a 2.2GHz Core2 Duo Macbook Pro I can't even think about using IDEA in debuging mode with only one method breakpoint enabled.

J2EE Blogger said...

Alex, I do not know what caused the problem with the method breakpoints. It'll be an interesting question for JetBrains to answer.

Hamlet D'Arcy said...

There are some other performance tips nestled in the comments of this blog post: http://hamletdarcy.blogspot.com/2008/02/10-helpful-hints-on-moving-from-eclipse.html

(happens to be my own site)

handout said...

hi bro...
nice post
if you want
get my collection reference at
UNAND's REPOSITORY

Markus said...

Thanks for the great post! :)
It really helped me getting started on this topic, as I was trying to find ways to optimize my PhpStorm performance.

After getting good results I wrote an article covering a little more detail on some of the topics and figured to leave a link here, just in case some one else stumbles over this post ;-).

Well well... why another J2EE blog? I benefited from other people's technical blogs, and guess what, it's a good idea to contribute some of my works too. Hope it's helpful and useful, to all of your folks.