Make Eclipse use memory (RAM) more efficiently

Make Eclipse use memory (RAM) more efficiently

If you use the Eclipse software development environment to you will find this tip very useful.  (We use an Eclipse IDE to develop on Salesforce’s Force.com platform – Apex, Visualforce, JavaScript & jQuery).

By default, Eclipse takes up huge amounts of RAM.  Here is the fix:

In the eclipse.ini file (or forceide.ini file for Salesforce’s Force.com IDE version of Eclipse), edit the -vmargs section to have the following:

-Xms128m
-Xmx512m
-XX:MaxPermSize=120m
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing

My defaults were:

-Xms256m
-Xmx1024m

The Xms is the minimum memory for the application and the Xmx is the max.

Before the change, Eclipse was happy to gobble up 1Gb of RAM.

This change has made a huge impact on the overall responsiveness of my computer while using Eclipse, so I thought I would share.  Hope you find this tip useful.

–DH

Read more about Salesforce Development