10

I've recently installed eclipse 3.4 on mac for java and flex coding - I noticed that the eclipse IDE on a mac is much slower than on a PC. By slow, I mean the UI and text editing seems to lag in comparison to eclipse in a windows environment or on a PC.

Are there any tricks to getting eclipse more responsive on macosx?

kevin
  • 101
  • 1
  • 3
  • Which of the versions for Mac are you using? there are several types which use different UI frameworks. – Uri Feb 05 '10 at 00:10
  • Can you post the contents of your eclipse.ini file please. – Jonathan Holloway Feb 05 '10 at 00:13
  • I found Eclipse slow on 4GB Vista 32-bit. Creating a RAM disk from the ca. 700MB of memory not addressable by the OS and placing a copy of frequently used Eclipse and JRE on the RAM disk made a big difference to overall performance. Using that same RAM disk as the primary swap partition helped performance of Eclipse as well, but to a lesser extent. You can move entire directories to the RAM disk or individual files by renaming the original and creating a symbolic link from the original name to the file on the RAM disk. – Eric J. Feb 05 '10 at 00:22
  • What kind of windows PC are you using where Eclipse isn't slow? – brianegge Feb 05 '10 at 00:38

6 Answers6

3

Try messing with your eclipse.ini file to optimise things (located in your Eclipse installation directory). Mine looks like this:

Note: this is from a Windows version, and won't work for the Mac

-vm
c:/Program Files (x86)/Java/jdk1.7.0/bin
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100118.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100118
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
c:/Program Files (x86)/Java/jdk1.7.0/bin
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xmn100m
-Xms512m
-Xmx700m
-Xss4m
-XX:PermSize=400M
-XX:MaxPermSize=500M
-XX:CompileThreshold=10
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UnlockExperimentalVMOptions
-XX:+UseParallelGC
-XX:+UseFastAccessorMethods
-XX:+AggressiveOpts

But the important lines are:

-Xmn100m
-Xms512m
-Xmx700m
-Xss4m
-XX:PermSize=400M
-XX:MaxPermSize=500M

as these mess with the heap size, stack size, max memory that can be used by Eclipse, and so forth.

You'll need to retain some element of your eclipse.ini, just copy the bits you need into your own.

AlBlue
  • 23,254
  • 14
  • 71
  • 91
Chris Dennett
  • 22,412
  • 8
  • 58
  • 84
  • 1
    Interesting. +1. Mine is there: http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/1409590#1409590 – VonC Feb 05 '10 at 05:18
3

My suggestions:

  • Use 3.5
  • Use Cocoa version (instead of Carbon)
  • Make sure you use the Java 6 64bit
nanda
  • 24,458
  • 13
  • 71
  • 90
3

Yes, you should move to Eclipse 3.5 with 64-bit Cocoa and all the other INI suggestions are valid.

There are two additions to the JVM switches which are especially important when running in 64 bit on Snow Leopard:

  • -XX:+UseParallelGC
  • -XX:+UseCompressedOops

For more details, see my full post on installing Eclipse 3.5 on OS X.

zvikico
  • 9,765
  • 4
  • 38
  • 49
  • `UseCompressedOops` is enabled by default as of JDK 6u23. http://blog.juma.me.uk/2008/10/14/32-bit-or-64-bit-jvm-how-about-a-hybrid/ – Matt Ball Sep 29 '11 at 14:32
2

The most important thing you need to do is to put this in the eclipse.ini:

-Dosgi.requiredJavaVersion=1.6

Detailed information can be found here:

http://www.inteist.com/2010/05/how-to-speed-up-eclipse-on-os-x-10-6-snow-leopard/

inteist
  • 493
  • 8
  • 15
1

Switch to 3.5. Eclipse switches to a more appropriate GUI API between 3.4 and 3.5.

bmargulies
  • 97,814
  • 39
  • 186
  • 310
1

Also make sure you get the 64 bit version of eclipse. Upgrading to helios 64 bit solved all my performance issues on my macbook pro.

jon
  • 11
  • 1