Increasing and Optimizing Eclipse performance

I noticed that Eclipse was running really slow on my relatively new Laptop when developing Java Android Applications, and could not stand all the latency and waiting periods, so I decided to do something about this.

Running version: Eclipse “Juno” (4.2.0 32-bit) (Running on Oracle JRE 1.7) on Funtoo Linux x86-64

I have no statistics to provide, but my in my case the performance was significantly enhanced. No more lags, delays or waiting-times!

To really improve performance

Get an SSD. Move your Workspace to this drive and you’ll be amazed at how fast things get. The next steps in the article will make it even more snappy 🙂

You can also move your JREs and other included SDKs to this drive to get some extra boost.

Eclipse Configurations

Disabling some of the default functions can really improve the performance.

Disable Spell-checking

Uses massive amounts of resources and time.

Windows --> Preferences --> General --> Editors --> Text Editors --> Spelling

Disable Folding

Disable ability to fold/collapse code blocks

Windows --> Preferences --> General --> Editors --> Structured Text Edtitors
Windows --> Preferences --> Java --> Editor --> Folding

Disable unwanted Plugins

Speeds up booting time and lowers memory usage.

Windows --> Preferences --> General--> Startup and shutdown

(Optional, but Recommended)  Disable Automatic Build

Disable automatic build on saving. This can eliminate some lag and “freezing” issues. Use CTRL+B for manual build instead (Running a project will also build it).

Project --> Build Automatically (Uncheck this)

(Optional) Close open Projects and Perspectives you are not using

Project --> Close Project
Window --> Close Perspective

Configure Eclipse launcher

To further speed things up we need to edit the Eclipse launcher arguments.

Windows users can do this in a file called eclipse.ini. Linux users will have to modify either the launcher file or a configuration file located in /etc somewhere.

You can easily adjust these parameters using the official Oracle documentation.

These settings enables the latest GC capabilities, increases memory allocation space and applies some general optimizations to increase performance, including threading and parallel processing. Uses about  ~2G of memory and 2 Threads for the GC.

Linux distros with a launcher config file:

I run Funtoo (Gentoo), and I have a configuration file for the launcher in /etc/eclipserc-bin-4.2:



ECLIPSE_USER_ARGS="-XgcPrio:deterministic -XX:MaxGCPauseMillis=10 -XX:MaxHeapFreeRatio=70 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -Xss2m -XX:+UseParallelGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -XX:GCTimeRatio=49 -XX:GCPauseIntervalMillis=1000 -XX:+UseCMSCompactAtFullCollection -XX:+CMSClassUnloadingEnabled -XX:+DoEscapeAnalysis -XX:+UseCompressedOops -XX:+AggressiveOpts -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+UseFastAccessorMethods"

Windows users and other Linux distros :

Locate the launcher (ex: `whereis eclipse-bin-4.2`, at least on my system)  / eclipse.ini and apply these arguments:

-Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m -XgcPrio:deterministic -XX:MaxGCPauseMillis=10 -XX:MaxHeapFreeRatio=70 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -Xss2m -XX:+UseParallelGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -XX:GCTimeRatio=49 -XX:GCPauseIntervalMillis=1000 -XX:+UseCMSCompactAtFullCollection -XX:+CMSClassUnloadingEnabled -XX:+DoEscapeAnalysis -XX:+UseCompressedOops -XX:+AggressiveOpts -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+UseFastAccessorMethods

About this entry