Boost Eclipse Performance (also works for ZendStudio)

19 Oct

Eclipse (software)

Image via Wikipedia

Make Eclipse Faster

Eclipse is my daily IDE, it handles my needs fairly well, but is very common to see people asking around how to make it faster, or why is it so damn slow.

Its easy to make it way faster, what I don’t really understand is why eclipse’s config file comes with such low values for memory usage.

First of all find your ini config file. Go to the folder where you eclipse is installed and then access eclipse.ini file (it also works for ZendStudio.ini), so you can alter some lines to make it way faster. Just one warning, before alter this file BACKUP, BACKUP and BACKUP!

If you think you know what you’re doing inside this file skip to the final config files at your own risk. I recommend you to read the entire article… it is short anyway!

  1. Remove Splash Screen Image (that loading screen when you click the icon dude!)
    On the beginnig of the file  add “-nosplash”
  2. Specify your JVM
    Find out the line with “-vmargs” and add the proper line BEFORE it. IMPORTANT: the path to your JVM must be in one line and must be in the line immediately bellow “-vm”
    On windows will be something like this:

    -vm
    C:\Java\JDK\1.5\bin\javaw.exe
    -vmargs

    On Linux:

    -vm
    /opt/sun-jdk-1.6.0.02/bin/java
    -vmargs

    On MACOS

    -vm
    /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
    -vmargs
  3. Increase heap size and permgen size (Give eclipse more RAM to use)
    Xms -> The amount of RAM memory JVM will initially alocate
    Xmx -> the maximum allowed amount of memory
    -XX:PermSize/-XX:MaxPermSize ->  the allowed amount of memory for permanent objects in memory
    At my computer I use something like this, off course, tune it as you like

    -vmargs
    -XX:PermSize=256M
    -XX:MaxPermSize=256M
    -Xms256M
    -Xmx768M
  4. Advanced Optmizations
    You can squeeze more juice with some other cool startup configurations under the “-vmargs” section of the file, BE CAREFULL with this settings
    Add the option “-Xverify:none” to skip validation of .class files
    Use “-XX:+AggressiveOpts” instead of Permsize/MaxPermsize  options if you want JVM to try to find out the best values for you machine
    -XX:+UseParallelOldGC -> Use the old garbage collector
    -XX:ParallelGCThreads=2 -> number of threads running in paralell
    -XX:ThreadPriorityPolicy=1 -> here 1 means “aggresive” under linux you must be running as root. Atention: this can slow down your system if your Eclipse become a bit hungry for resources…
    -XX:+AggressiveHeap -> Your eclipse can just close without any warning with this configuration depending on your JVM version. Try to update you JVM if this happens and if you can’t fix it just remove this line. By the way it tells the JVM to find out the best heap size for your machine. Substitute the Xms/Xmx lines for this one to try out.

Final eclipse.ini file (Agressive)

-nosplash
-vm
C:/Program Files/Java/jdk1.6.0_23/bin/javaw.exe
-vmargs
-XX:+AggressiveHeap
-XX:+AggressiveOpts
-XX:+UseParallelOldGC
-XX:ParallelGCThreads=2
-XX:ThreadPriorityPolicy=1
-Xverify:none

Final eclipse.ini (moderated)

-nosplash
-vm
C:/Program Files/Java/jdk1.6.0_23/bin/javaw.exe
-vmargs
-XX:PermSize=256M
-XX:MaxPermSize=256M
-Xms256M
-Xmx768M
-XX:+UseParallelOldGC
-XX:ParallelGCThreads=2
-XX:ThreadPriorityPolicy=1
-Xverify:none

One more step for Windows 7 and Vista users

While not directly related to Eclipse:

If you’re running Win-7 or Vista, disable the file indexing of your workspace – your home folder. Windows by default indexes everything in you home folder, and it’s normally just a waste for your workspace. Right click the workspace folder in explorer ,Properties->Advanced and uncheck the “Index this folder for faster searching”

Worth checking links:

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

4 Responses to “Boost Eclipse Performance (also works for ZendStudio)”

  1. nfs world hack April 1, 2012 at %I:%M %p #

    I used to be suggested this blog by way of my cousin. I’m not positive whether or not this publish is written via him as nobody else recognise such designated about my difficulty. You’re amazing! Thank you!

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  2. xbox 360 emulator v3.2 March 24, 2012 at %I:%M %p #

    I think that is among the most significant information for me. And i am happy studying your article. But want to remark on few basic issues, The site taste is great, the articles is truly excellent : D. Excellent job, cheers

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  3. Eiswürfelformen March 14, 2012 at %I:%M %p #

    Youre so cool! I dont suppose Ive read anything like this before. So nice to find any individual with some authentic thoughts on this subject. realy thank you for beginning this up. this website is something that is needed on the net, somebody with a little originality. useful job for bringing one thing new to the web!

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  4. Lida Riech March 14, 2012 at %I:%M %p #

    Along with the whole thing that appears to be building inside this specific subject material, all your perspectives are actually fairly stimulating. Nonetheless, I am sorry, but I do not subscribe to your entire theory, all be it refreshing none the less. It would seem to everyone that your opinions are actually not completely rationalized and in reality you are generally your self not entirely convinced of your point. In any event I did enjoy reading it.

    VA:F [1.9.22_1171]
    Rating: 3.0/5 (2 votes cast)

Leave a Reply