Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse IDE speed sluggish on Snow Leopard Macbook

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?

like image 507
kevin Avatar asked Feb 05 '10 00:02

kevin


4 Answers

My suggestions:

  • Use 3.5
  • Use Cocoa version (instead of Carbon)
  • Make sure you use the Java 6 64bit
like image 123
nanda Avatar answered Nov 14 '22 11:11

nanda


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.

like image 34
Chris Dennett Avatar answered Nov 14 '22 09:11

Chris Dennett


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.

like image 3
zvikico Avatar answered Nov 14 '22 11:11

zvikico


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/

like image 2
inteist Avatar answered Nov 14 '22 11:11

inteist