Make Eclipse Faster
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!
- Remove Splash Screen Image (that loading screen when you click the icon dude!)
On the beginnig of the file add “-nosplash”
- 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
-vm /opt/sun-jdk-1.6.0.02/bin/java -vmargs
-vm /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -vmargs
- 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
- 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
-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: