Wednesday 23 February 2011

How to Beat Eclipse Up With A Stick So It Runs Faster

Background(aka Rants)

Apart from the machine that I've described on the previous post, I do have another machine, its an AMD Phenom II X4 925, 2.79 GHZ with 4GB or RAM running XP Professional SP 3. Eclipse run really (I mean, really) slow in this machine.

The most annoying problem ever was that when i start hitting "." after a variable name eclipse will go into this retardation freeze for approximately 5 seconds.

The Important Bits:

1. Make sure that you're running the newest eclipse and SUN JDK.
2. Tweak your eclipse .ini file. Here's my current eclipse. ini file :


-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
384m
--launcher.XXPermSize
128m
--launcher.XXCompileTreshold
5
--launcher.XXMaxGCPauseMillis
10
--launcher.XXMaxHeapFreeRatio
70
--launcher.XX+UnlockExperimentalVMOptions
--launcher.XX+CMSIncrementalPacing
--launcher.XX+UseG1GC
--launcher.XX+UseFastAccessorMethods
--launcher.defaultAction
openFile
-Xms512m
-Xmx1024m
-Xss4m

The part that you might want to do differently :

-Xms sets the initial Java heap size
-Xmx sets the maximum Java heap size
-launcher.XXMaxPermSize allows for the JVM to be able to grow the PermSize to the amount specified. Initially when the IDE is loaded, the MaxPermSize will still be the default value but will not actually take up that amount until it is needed.
-launcher.XXPermSize controls the size allocated to compiled classes and permanent data structure.
-launcher.XXMaxGCPauseMillis=10 is *request* for the JVM to pause at most 10 ms.

3. Disable label decorations (Windows -> Preferences; General -> Appearance -> Label Decorations).
I only have Android Decorator, Java Type Indicator and Task Change Set Decorator enabled.
4. Disable startup/shutdown task on startup (Windows -> Preferences; General -> Startup and Shutdown).
I disabled Usage Data Gathering/Recording.
5. Disable spell check (Windows->Preferences;General->Editors->Text Editors->Spelling).
I'm coding, not writing a book.
6. Disable auto building (Windows->Preferences;General->Workspace).

So...its mildly less retarded now...but I want a faster autocomplete...you know...like what Visual Studio has...

1. Go to Window / Preferences / Java / Editor / Content Assist / Auto-Activation and decrease Auto activation delay from 200 to zero

2. Patch eclipse

http://www.google.com/url?sa=D&q=http://adt-addons.googlecode.com/svn/patches/org.eclipse.jdt.core_3.6.1.v_A68_R36x.zip
Replace <ECLIPSE_HOME>/plugins/org.eclipse.jdt.core_3.6.1.v_A68_R36x.jar with the file downloaded from the folder

References : (I highly recommended going to these links as it provides the reasons/explanations why-for example-the above eclipse settings works)


http://stackoverflow.com/questions/316265/tricks-to-speed-up-eclipse
http://blog.normation.com/2010/05/24/optimizing-eclipse-performances/

http://groups.google.com/group/android-developers/msg/0f9d2a852e661cba?pli=1

Thursday 17 February 2011

Introduction

My first post ever! Yay!

This blog is meant to post useful stuff *cough cough* pain... that I've encountered during Android development.

My weapon of choice is:

Thermaltake V9 Blacx Edition
Intel Core i5 760 Processor
Asus P7P55D-E DELUXE
Kingston KVR1333D3N9K3-12G worth
500W Antec EA-500D Earthwatts ATX PSU
XFX HD5770 850M PCIe/1GB/DVI/HDMI
OCZ VERTEX 2 60GB SSD
WD 3.5"inch Green 2TB WD20EARS
2x22" Dell LED monitor

All parts comes from MSY, MCG Tech, Netplus and itsdirect.com.

For all you guys that resides in Australia, I'll recommend going to http://www.staticice.com.au/ to get the best price for your computer parts. Just add state:WA (if you're in WA or QLD if you're in QLD etc) at the end of the keyword and voila! you'll get the list of items/price in your local area.



Squee