The Artima Developer Community
Sponsored Link

Java Buzz Forum
Eclipse Ini Tunning

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Fred Grott

Posts: 105
Nickname: sharemefg
Registered: Nov, 2005

Fred Grott is an android developer producing prototype applications for Chicago start-ups
Eclipse Ini Tunning Posted: May 31, 2012 5:51 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Fred Grott.
Original Post: Eclipse Ini Tunning
Feed Title: GrottWorkShop
Feed URL: http://shareme.github.io/atom.xml
Feed Description: Android development with a passion for Android, Java, and Agile.
Latest Java Buzz Posts
Latest Java Buzz Posts by Fred Grott
Latest Posts From GrottWorkShop

Advertisement

Part of being a new android developer is that imersion in using Eclipse and not all the information is easy to find. To fine tune the speed of Eclipse you have to modfiy and add some options to the Eclipse INI file. So lets get you up to speed in completing that task.

A typical Eclipse INI file

A typical Eclipse IDE INI file looks something like this:

Turn off Virus scanning of Workspace dirs

This is really true if you are on MS Windows, run off virus scanning on all your workspace directories and the Eclipse IDE installation folder.

JVM Version

Udating and using the newest JVM not only protects use as far as security holes but it alos gives us new options in GC. etc to tune and speed up Eclipse so lets update our JVM. After typing the

java -version

command in a terminal you should see the java version and if its not the most recent version than you need to install the most recent version.

VM Optons

Okay, before going wild with this backup a copy of your Eclipse INI file just in case you goof it up the first time. The first step is to make sure that since we will be using the latest VM options ot the latest JVM that is the JVM that Eclipse will boot up under.

D Options

Any time you see a

-D

option its a command to the JVM to pass on an option to the application and the application in this case is the Eclipse IDE itself. Thus:

-Dosgi.requiredJavaVersion=1.7

tells the Eclipse IDE OSGI component that only bootup Eclipse using the ini file using JVM 1.7 or higher. If you are on JVM 1.7 or higher change that like to mirror using 1.7 now.

Server option

The server option flag refers to which JVM client you are using either the default which is client or server. The option command to pu in the INI file is:

-server

insert it right after the vmargs flag.

Standard and Non-standard JVM options

Flags with X are standard JVM options and flags with XX are non-standard options. Generally you set most if not all the standard X flags first since you know that they are stable from major version of JVM to next major version of JVM.

Than you will set the non standard flags last and it helps if do a small subset at a time boot up eclipse and make sure that it runs.

X Memory options

Now lets set up the minimum and maximum start up JVM memory sizes that Eclipse IDE will use. Xms is minimum(physical ram size/16) and Xmx is maximum(physical ram size/4). Thus for 4 gigs of physical ram, for example on a Mac Laptop, you would have:

-Xms326m -Xmx812m

You will always want tomake sure that the setting for Xmx plus XXMaxPermSize does not exceed your physical ram.

X new generation size

Xmn is the new generatin size flag and generally likes:

-Xmn128m

insert it right before your JVM X memory option settings.

X Thread stack size

Xss is the thread stack size setting flag and generallty you will set it to:

-Xss1m

insert it right after the Xmn setting.

X GC flag setting

Okay now its time to pick a GC to use. But before we get to that we need to the method that the GC will use. I am using deterministic:

-Xgc:deterministic -XpauseTarget:20

and I have set the GC pause to 20.

Rest of the Non_standard Settings

The rest of the non-standard settings are:

-XX:PermSize=400M -XX:MaxPermSize=500M -XX:CompileThreshold=10 -XX:MaxGCPauseMillis=10 -XX:MaxHeapFreeRatio=70 -XX:+UnlockExperimentalVMOptions -XX:+DoEscapeAnalysis -XX:+UseG1GC -XX:+UseFastAccessorMethods -XX:+AggressiveOpts

The G1 GC is being used and the rest are performance options settings.

The full eclipse ini file

The full eclipse ini file:

The above is based on the JVM HotSpot and thus if you are using JRockit you might have to change one or more flag settings.

Read: Eclipse Ini Tunning

Topic: Free Android Resources Previous Topic   Next Topic Topic: Tractor Time

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use