Saturday, 25 April 2009

Making Eclipse Fly

When compared to NetBeans, I find that Eclipse is a lot slower, particularly when doing enterprise development. To try and speed Eclipse up, I’ve taken the JVM settings that NetBeans uses and applied them to Eclipse. The result is a vast improvement in performance. The default JVM settings in Eclipse aren’t optimal.

On a Mac, the following procedure allows the JVM settings to be changed:

  • Find Eclipse in the Finder. Right click on Eclipse and choose "Show Package Contents"
  • Browse to the Contents | MacOS directory and edit the eclipse.ini file
  • In this file add JVM options, one per line.

The JVM options that make the biggest difference are the ones that specify how much memory Eclipse can use.

-Xms512m 
-Xmx512m 
-XX:PermSize=256m 
-XX:MaxPermSize=256m

I also tell the JVM not to verify bytecode using the -Xverify switch

-Xverify:none

According to the NetBeans performance tuning tips, changing the garbage collection policies can also make a difference. I’m not sure that these make much of a difference, but I’m running with them at the moment to see if there is any difference.

-XX:+UseConcMarkSweepGC 
-XX:+CMSClassUnloadingEnabled 
-XX:+CMSPermGenSweepingEnabled

Applying these switches has made Eclipse much more comfortable to use, but I guess other peoples milage may differ depending on what they are doing or what machine they are using.

Do you have any other JVM switches that you apply to IDEs to make them more responsive?

2 comments:

  1. I found that using Oracle's JRockit was a big boost. Not sure if your CC options are applicable for it, though.

    ReplyDelete
  2. @nickman. I've not used JRockit for a while as last time I tried it, I experienced issues with some software and I didn't want to be changing JVMs for different software. Maybe it's time for me to try it again though.

    Thanks.

    ReplyDelete

 
© doobries domain
Designed by BlogThietKe Cooperated with Duy Pham
Posts RSSComments RSS
Back to top