My Little Corner of the Net

Improving Eclipse Performance in OS X

I use various flavors of the Eclipse IDE for almost all of my programming these days, so when I got my new MacBook Pro laptop it was one of the first things that I installed.

And what a disappointment that was. While I’m used to Java apps being slow, since getting Core 2 Duo Windows machines at work and home I’ve come to expect Eclipse to be fairly snappy. Since the Mac has twice the RAM of the other machines I expected the same, or better, performance from it. The first time I started Eclipse on the Mac it took nearly two minutes to load! Once it loaded it was fine, but the two minute load was something that I though I gave up when I moved off of my old Gateway P4/512Mb laptop.

I did a couple of Google searches and found others complaining about the slowness of Eclipse on their Mac, but no solutions. Then I remembered having to tweak some settings to improve performance on that old Gateway. I figured the same might be in order for the Mac, and I was right.

If you’re frustrated with the slowness of Eclipse on the Mac, try this:

  1. Find your Eclipse.app file (probably just labeled “Eclipse” and showing the familiar purple globe icon), Control-Click on it, and choose “Show Package Contents” from the context menu.
  2. Open up the Contents/MacOS/eclipse.ini file in a text Editor such as TextEdit
  3. Find the line “-Xmx256m” and change it to “-Xmx512m.” This increases the maximum memory that the Java VM will allow Eclipse to consume.
  4. Save and close the ini file and close the Eclipse finder window
  5. Double click on the Eclipse.app icon and watch Eclipse load much faster!

Upping the memory to 512Mb is now giving me comparable results to those of my Windows PCs. If you have the memory available, upping it even higher may give you even better performance, but I haven’t tried yet.

1 Comment to Improving Eclipse Performance in OS X

  1. 03/11/2011 at 2:46 pm | Permalink

    Hi there thanks for posting this but the problem I’m having is I can’t save the file after changing the RAM value because the file is read only .. any idea how I can change the write permissions to the file? I’ve had a look in the “get info” popup relating to the file but just tells me I can read only and there doesn’t seem to be a option to change this?

    I’m currently running Max OS X 10.6.6 and Eclipse Helios Service Release 1

    Many Thanks !

Leave a Reply

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

<