When compared to NetBeans, I find that Eclipse is a lot slower, particularly when doing enterprise development. To try and speed Eclipse up, I’ve taken the JVM settings that NetBeans uses and applied them to Eclipse. The result is a vast improvement in performance. The default JVM settings in Eclipse aren’t optimal.
On a Mac, the following procedure allows the JVM settings to be changed:
- Find Eclipse in the Finder. Right click on Eclipse and choose “Show Package Contents”
- Browse to the Contents | MacOS directory and edit the eclipse.ini file
- In this file add JVM options, one per line.
The JVM options that make the biggest difference are the ones that specify how much memory Eclipse can use.
-Xms512m
-Xmx512m
-XX:PermSize=256m
-XX:MaxPermSize=256m
I also tell the JVM not to verify bytecode using the -Xverify switch
-Xverify:none
According to the NetBeans performance tuning tips, changing the garbage collection policies can also make a difference. I’m not sure that these make much of a difference, but I’m running with them at the moment to see if there is any difference.
-XX:+UseConcMarkSweepGC-XX:+CMSClassUnloadingEnabled-XX:+CMSPermGenSweepingEnabled
Applying these switches has made Eclipse much more comfortable to use, but I guess other peoples milage may differ depending on what they are doing or what machine they are using.
Do you have any other JVM switches that you apply to IDEs to make them more responsive?
cool options
Thanks for the tips!
Eclipse now loads up faster on my machine.
In FlexBuilder i use these options and a couple others and it works very well.
I use -Xms -Xmx -XX:PermSize -XX:MaxPermSize with the great JBoss Tools for Eclipse. Default PermSize is too small usually.
I think -Xverify:none is a good idea.
I use Netbeans too. But in my experience, Netbeans need far more resources than Eclipse. Anyway, YMMV.
At the end, both are great tools, with their pros and cons.
Nice tips.
Didn’t gauge the difference but seems faster with those options. But even if it wasn’t faster I’m happy with the perception that it is (illusion is much more important than reality, whatever that means
).
The first thing I thought of is burning is on a disk and gluing it to a drisbee…
More memory always helps. Also, try turning off swap on your windows machines, it also will give you a wee bit of a boost.
At work we have rather old computers with only 1GB of memory, and I still want to use other softwares like Firefox (memory hungry too), Thunderbird and some others.
So the memory settings have to be tuned down (I chose 128/320 from 40/256).
Out of curiosity, do you know if it is possible to go beyond 512? I saw messages saying it can lead to troubles.
i implemented these suggestions yesterday and must say that they work perfectly. even booting eclipse with the -clean options is MUCH faster and i’ve seen a speed boost when eclipse builds the workspace.
I have got this message:
—————————
Eclipse
—————————
JVM terminated. Exit code=-1
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx512m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-Xverify:none
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-Djava.class.path=D:\dev\eclipse\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-os win32
-ws win32
-arch x86
-showsplash D:\dev\eclipse\\plugins\org.eclipse.platform_3.3.101.v200902111700\splash.bmp
-launcher D:\dev\eclipse\eclipse.exe
-name Eclipse
–launcher.library D:\dev\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
-startup D:\dev\eclipse\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-framework plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vm D:\Java\jdk1.6.0_13\bin\..\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx512m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-Xverify:none
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-Djava.class.path=D:\dev\eclipse\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
—————————
ОК
—————————
Eclipse has started only with:
-XX:PermSize=168m
-XX:MaxPermSize=168m
need help
(jdk1.6.0_13, 3.0 Ghz, 2Gb, WinXP SP3)
Pingback: Optimize Performance in Eclipse — Adam->Blog();
Tried these options on my Windows Vista, and my eclipse now is flying!
Great!!!
Modified my eclipse.ini using these parameters on fedora and eclipse is real fast now !! Scrolling is so smooth!! I also changed some settings from Preferences. Thank you for all the good info,
Thank you so much, it works way faster now!