I am using eclipse on Ubuntu 10.10 32bit, when I am compiling a huge android project, it is getting slower I have 4GB ram even (which is just 25% used) though its getting slower when I observed further eclipse is using only one CPU and creating 100% load on that where as other CPU is having only 20% load, is this eclipse problem or Ubuntu problem
Eclipse and the Java Development Kit used by Eclipse has approximately nothing to do with your development, with the development of an Android Application using the standard SDK.
To clarify this point you can consider 3 important facts:
I think that at this point should be clear the fact that your app is actually compiled by the SDK itself and what you are stressing as bad thing is usually referred as a good thing.
Multithreaded application and, in general, application ( with "application" right now i mean the SDK not your app ) that supports their execution splitted in several jobs, brings a big problem on the table: a good and effective debugging phase. Let's say that you are compiling something splitted in 4 threads, in the istant X your compiler crash, the question is: which of the 4 is the bad guy? all of them? just 1? 2? 3?
Considering that a tipical use of the Android SDK is not heavily based on multi-threaded design ( with that i mean that a developer can wait 1 or 2 minutes in the worst case scenario, nothing changes and the debug in multi-threaded environment with some concurrency on the go is much more complex and can take you weeks without achieving any results ), the adoption of a multi-threaded design can easily provide more cons than pros, especially during the phase of compiling and debugging.
In the end considering the audience of developers, the target of Android, what an Android application really is, this kind of software design is probably the most appropriate and effective and i will not considering the lack of a multi-threading compiling a bad thing.
Taken from eclipse's wiki page.
Eclipse it self itself has not multi-thread support, that means that no mater how many CPUs/CPU cores you have eclipse will run in one of your cores only.
More over, the ability for a compiler to use multiple CPUs/CPU cores will depend on which language you are using to develop your Android project.
Some compilers will be able to use multiple CPUs/CPU cores during compilation even if the IDE you are using does not take advantage of those.
The Linux Kernel has support for multiple CPUs/Cores in one system since Kernel version 2.0 allowing your programs to take advantage of that, but the program itself has to have support for multiple CPUs/Cores.
For more information on how Symetric multiprocessing works can be found here.
In short: Ubuntu has support for SMP because current Kernel version is < 2.0 (also on 9.10 as you know) but eclipse lacks the habitability to use multiple CPUs/Cores. Also even if eclipse had it it would (during project build) depend on the language and compiler you are using for your project.
This is all true no mater what compiler you are using including the ones in the Android SDK.
Presuming you use make as the project builder, and your dependencies are written correctly, your best best is probably to use parallel make. I think eclipse has a tick-box for that, but if not just add