Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Indigo typing lag on OS X Lion

I am working on a fairly large project and have recently bumped into the good old friend of mine from the 90's, typing lag. My setup is MacBook Pro 2.2 GHz i7 8GB with SSD drive and it hasn't had any serious performance issues so far.

I have increased the memory allocations to -Xmx1024m and -XX:MaxPermSize=512m. There is no heavy use of plugins involved. Also, this only happens on .java files in the default editor.

What could be the problem?

EDIT:
I found the problem. I noticed that the problem occurred only when editing large java files. In my case the class had 1800 rows.

It's weird though, since I am not facing the same problem with the same eclipse setup on Ubuntu. It seems like Eclipse on Mac just can't handle java files that big I was editing.

Any suggestions?

EDIT2:

I am using the Eclipse Indigo for Java EE with the latest updates (3.7.1.X)

Installed plugins:

  • m2eclipse
  • MercurialEclipse aka HGE (1.9.1 from the official eclipse update site)
  • Subclipse (installed, but not used in the workspace where the typing lag occurs)
  • ADT (installed, but not used in this project)

All plugins are installed via Eclipse marketplace and are updated to the latest release unless stated otherwise.

like image 499
Kimi Avatar asked Jan 30 '12 05:01

Kimi


1 Answers

Try altering the settings in your eclipse.ini file. This contain the settings for the JVM and can help reduce memory issues like this.

Example eclipse.ini:

-data
../../workspace
-showlocation
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
384m
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-vm
../../../../program files/Java/jdk1.6.0_17/jre/bin/client/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx384m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-Dcom.sun.management.jmxremote
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/jv/eclipse/mydropins

Detailed in this question and this question.

like image 147
Jivings Avatar answered Oct 11 '22 05:10

Jivings