

Speed up your eclipse as a super fast IDE - davideuler
http://www.beyondlinux.com/blog/?p=93

======
mattgreenrocks
I love Eclipse for Java, but it seems absurd that this page even exists in the
first place. I'm OK with a long startup time, but the amount of finagling I
had to do in order to get the Android environment to run without hiccuping
every 5 minutes is pretty ridiculous. You'd think desktop Java would move to,
oh, I don't know, a model where you don't have to set the heap size like we
did in Mac OS 7? It just seems archaic to sit there and try to reason how much
heap space we'd _possibly_ use ahead of time.

I don't want to care about that, and shouldn't have to.

------
d0m
Anyone using Eclipse can confirm that? I've moved away from that IDE for years
because how slow it was. (Also because it was so damn hard to configure it the
way I wanted)

I remember though putting somewhat similar in my config file.

~~~
pan69
I'm running Eclipse on Ubuntu (x64) on OpenJDK and it works fine. My hardware
isn't particularly fast either. I might reboot one a week or so. I do have 8GB
of memory though.

~~~
bad_user
For some reason, on Ubuntu x86, Eclipse is really slow for me.

IntelliJ Idea is much better. And now the community edition comes with
capabilities for Android projects.

I recommend it instead of Eclipse.

~~~
zokier
What JVM you are running? See <http://news.ycombinator.com/item?id=2694965>

------
zubairov
Reduce in start time does not automatically mean your IDE will work faster.

------
vrotaru
As for moving jdk instal to ramdisk, on can (ab)use the fact that in
Debian/Ubuntu /usr/lib/jvm/java-6-sun is a symbolic link to
/usr/lib/jvm/java-6-sun-${version}/

So create a tmpfs and mount it under /usr/lib/jvm/java-6-sun

    
    
        sudo mount -t tmpfs -o size=200M,nr_inodes=2k,mode=0775,noatime,nodiratime tmpfs /usr/lib/jvm/java-6-sun
        cd /usr/lib/jvm/java-6-sun
        cp -a /usr/lib/jvm/java-6-sun-${version}/* .
    

Done. Of course, if you have more than one jdk installed, update-alternatives
may be necessary

------
planb
Short version: Buy an SSD.

------
davideuler
On my Aspire 4745G laptop with 4g ram windows 7 x64, it is fairy slow to run
eclipse x64 with jdk x64. So I adjusted the vm arguments and some eclipse
setting mentioned above, and found it runs super fast after the change.

If it works or does not work on your machine, or any other smart way to speed
up your eclipse, pls let me know.

------
longlistener
Gads, its unfortunate that the site hosting this article is so filled with
spammy ads -- the full screen intro is acceptable, but the full screen popup
is not, and having both is just nuts. I like _not_ using adblock, so site can
get some impression revenue, but sites like this continue to make me think
adblock is needed.

------
mgkimsal
I can't seem to find an 'eclipse.ini' file on my system at all. I had eclipse
sts and zend studio both installed (both based on eclipse) but "locate
eclipse.ini" nets me nothing. Perhaps it's config.ini? Or somewhere else these
recommended changes should be made?

~~~
shareme
sts and zend rename it to something *.ini

------
wr1472
I couldn't get it to work with the -Xmn128m argument. It wouldn't startup with
it in, without it certainly does speed up the startup time.

~~~
davideuler
curious what's your jdk and eclipse version is ?

------
elb0w
or use vim

~~~
devinfoley
I use vim for everything but Java. When it's Java time, I use Eclipse. In
fact, if every language worked as well in Eclipse as Java does, I'd probably
use Eclipse for everything (like I used to). The productivity gains you get
from using Eclipse for Java vs a text editor (vim) are HUGE. This is not a
fault of vim, it's a fault of Java for being so verbose.

Example: you can move a method to a new class in Java, and Eclipse will go
through your entire project and find all references to that method and update
them for you.

I guess it's the same reason C# and MS coders love Visual Studio so much.

That said, I try to avoid using Java, and generally stick to vim.

~~~
chillax
But wouldn't you apply some of those refactorings in other languages too?
Movings methods, refactoring out inner classes, removing/adding parameters to
methods and constructors etc. It all adds up if the language has good support
in your IDE.

I'm not a power user of vim, but perhaps there are some kind of extensions for
some of these things there?

~~~
babebridou
I wish there was be something, actually, that would match what you can do with
the Eclipse/Java combo for other languages.

Eclipse turns java into a ctrl-space fest. People yell at java for being
verbose and statically typed, but all this verbosity is what allows an IDE
such as Eclipse to exist. Just press ctrl+space and the verbosity turns into
clarity and speed for both the programmer and the IDE.

I have more than a million lines of codes behind me since I learned how to
program, 4 years ago. That's 250 thousand lines of working code per year, and
I didn't even code more than half-time in java, and I can't type faster than
40wpm. I'm not advocating quantity vs quality, just saying that quantity
becomes a completely irrelevant measure when you use Eclipse & Java, and
that's very refreshing; you can keep coding long, dumb, and not performance-
critical code while you think about another more important/complex section of
your project, participate to a meeting, discuss stuff on the phone - you just
set sail and let Eclipse do the hard rowing for you.

As for refactoring - delete a class named MyClass with a doStuff() method in a
project, create a new interface MyClass with a doStuff() method in another
project and another package, add this project as a dependency to the first
project, select the first project, press ctrl+shift+O, et voila, every file
was fixed, and it simply works within a few seconds even if there are a
thousand sources referencing that MyClass. I'm not sure if there's any
language/IDE that allows that sort of fast & furious refactor, but do tell!

What are other great IDE/language combos?

~~~
Mavrik
Other combos? Prehaps Visual Studio for C# with ReSharper. It even gives
suggestions about folding loops into LINQ statements and simillar.

What I'm really disappointed is abysmal quality of IDEs for dynamic languages
(Python and JavaScript for example). I know that's because of the language
design, but writing code in those languages after coming from Java/Eclipse or
VS2010/C# feels like I'm crippled.

~~~
babebridou
Unity3d has its own javascript-like language and introduced the keyword
#pragma-strict - it enforces static typing within a script. I imagine an IDE
could make good use of such toggle, for the best of both worlds.

[http://unity3d.com/support/documentation/ScriptReference/ind...](http://unity3d.com/support/documentation/ScriptReference/index.Performance_Optimization.html)

------
drivebyacct2
The best recommendation is to make sure you're using the Sun JDK and not the
GCC-GCJ. That alone will constitute a large speed up. I imagine the ram disk
will give basic speed-up. Can't attest to the others though, Eclipse runs more
than fast enough here.

~~~
baconface
How does the Sun JDK significantly outperform the GCC-GCJ?

~~~
Locke1689
What do you mean by this? The gcj JIT is shit compared to the jdk, that's how.

------
hackermom
From what I can tell, this only speeds up Eclipse' ridiculous start-up time,
or am I wrong? This doe~ _freeze_ ~sn't me~ _freeze_ ~an that the IDE it~
_freeze_ ~self will bec~ _freeze_ ~ome smooth.

~~~
vrotaru
If it speeds class loading __and __reduces GC times it should freeze less, as
well

------
noduerme
Some nasty script on this page crashes firefox.

