61

I'm using Eclipse PDT on a rather large PHP project and the IDE is almost unusable. It takes nearly 30 seconds to open a file, and other actions, like selecting a folder in the file explorer, editing some text, etc. are equally slow.

I followed various instructions to speed it up but nothing seems to work. This is my current eclipse.ini file. Any idea how I can improve it?

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-server
-Dosgi.requiredJavaVersion=1.7
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:+UseParallelGC

System: Eclipse 4.2.0, Windows 7, 4 GB RAM

Charles
  • 48,924
  • 13
  • 96
  • 136
laurent
  • 79,308
  • 64
  • 256
  • 389
  • 1
    Get some stack traces in those 30 seconds to see what's going on. You can do a thread dump on the Eclipse process. The memory and stack sizes looks big enough, so that's probably not your problem. – Francis Upton IV Jul 12 '12 at 07:25
  • 1
    Actually in looking at your machine configuration, you should make sure nothing else is going on in the machine and experiment with reducing your required memory, say something like `-Xmx512m`. If you are requesting too much heap space, then it's possible you are doing a lot of OS paging. – Francis Upton IV Jul 12 '12 at 07:33
  • Other than waiting for SR1 I'm not sure. I suspect there may have been some reversions in the eclipse.exe file, if not there then maybe its just the plugin emulation layer. I switched over to Juno and noticed that its seems to have a bit less performance than the previous release. – Robert Jul 12 '12 at 18:34
  • 2
    @FrancisUpton, reducing the required memory using -Xmx512m indeed fixed the issue. It's still not fast but at least it's usable. Thanks a lot. Feel free to put your comment as an answer and I'll accept it. – laurent Jul 16 '12 at 07:58
  • Done, thanks, glad it worked out. – Francis Upton IV Jul 16 '12 at 14:29
  • 4
    Eclipse Juno 4.2 bug #[385272](https://bugs.eclipse.org/bugs/show_bug.cgi?id=385272) is probably the root cause. This defect is targeted to be fix in 4.2.2 ~Feb 2013. For more info see this InfoQ article "[Eclipse Performance Issues in Juno](http://www.infoq.com/news/2012/09/eclipse-juno-performance)". – buzz3791 Oct 10 '12 at 15:49
  • Here's another clue: when I switch tabs, I get a lot of flashing in the toolbar. – ccleve Nov 12 '12 at 22:14

11 Answers11

35

It looks like Eclipse in silence have created a fix and announced it in all secracy through their wiki (!). It seems to alleviate the problems for me at least; though I have not tested it in length yet.

See http://wiki.eclipse.org/Platform_UI/Juno_Performance_Investigation

Basically you should install the "Juno SR1 Patches/Eclipse UI Juno SR1 Optimization" from their 4.2 update site: http://download.eclipse.org/eclipse/updates/4.2

Bug-tracking for this optimization: https://bugs.eclipse.org/bugs/show_bug.cgi?id=394588

thoredge
  • 11,158
  • 1
  • 34
  • 50
28

There are known performance issues with PDT 3.1 and eclipse 4.2 (juno).

https://bugs.eclipse.org/bugs/show_bug.cgi?id=385272

This is the solution:

Open a different perspective (for example java, but not php) and restart eclipse. Afterwards you can savely switch back to php perspective. Eclipse will have no performance issues.

Also mentioned here

stot
  • 1,015
  • 10
  • 20
  • It worked for me, System: Eclipse 4.2.0 32bit, Windows 7, 4 GB RAM – Madarco Sep 06 '12 at 11:02
  • 2
    I've just moved back from 4.2 (Juno) to 3.7 (Indigo). Juno has several performance bugs! Reverting has fixed performance totally. There's also a 3.8 available which has bugfixes over 3.7, but not available as packaged build -- features & plugins have to be installed from within Eclipse. – Thomas W Oct 14 '12 at 10:16
  • see also [eclipse wiki](http://wiki.eclipse.org/Platform_UI/Juno_Performance_Investigation) for how to apply patches to 4.2.1. – fischermatte Jan 04 '13 at 16:25
9

Actually in looking at your machine configuration, you should make sure nothing else is going on in the machine and experiment with reducing your required memory, say something like -Xmx512m. If you are requesting too much heap space, then it's possible you are doing a lot of OS paging.

Francis Upton IV
  • 18,850
  • 3
  • 50
  • 55
6

There is also a known bug which makes eclipse juno slow on some systems :

https://bugs.eclipse.org/bugs/show_bug.cgi?id=385272

A workaround seems to be to delete the workbench.xmi file.

Mysticial
  • 438,104
  • 44
  • 323
  • 322
TahitianGabriel
  • 226
  • 2
  • 6
4

From http://wiki.eclipse.org/Platform_UI/Juno_Performance_Investigation

  1. Ensure you are already running on a package from the Juno SR1 release (September 2012)
  2. Invoke Help > Install New Software
  3. Select this repository: http://download.eclipse.org/eclipse/updates/4.2
  4. Expand Juno SR1 Patches and install Eclipse UI Juno SR1 Optimizations

Worked for me

3

I was having similar issues with the Eclipse and the ARM emulator running. When I switched from tab to tab on Eclipse it would take 5 seconds for it to switch over and Eclipse would be in a "Not Responding" mode for a moment. I actually increased my heap memory on my eclipse.ini by using -Xmx1024m. It fixed the issue.

Nimroo
  • 65
  • 8
2

I had very big UI performance issues upon switching to 4.2 (using PDT) and after investigating for a while, I noticed it was due to... the PHP perspective. That doesn't make any sense, but I could confirm it on two different computers.

Try switching to another one (like, the Resource one), then restart Eclipse (last part is important).

Let me know if that helped.

Jeto
  • 13,447
  • 2
  • 22
  • 39
  • 1
    The Resource view indeed seems to be significantly faster. Thanks a lot for sharing the tips! – laurent Jul 22 '12 at 08:06
2

I was having huge problems with performance (switching between editor windows was SLOW). I modified the eclipse.ini file to use -Xmx1024m rather than -Xmx512m and the performance is much better.

Update -- After a while I started noticing the fix above did not make my problems go away entirely. I did find another post above helpful. I install the Spring Source Toolsuite plugin and I believe that may be the source of the slowness. After installing the patch at the following link, Eclipse is running much more smoothly: http://wiki.eclipse.org/Platform_UI/Juno_Performance_Investigation

Dean Peterson
  • 457
  • 6
  • 14
1

Eclipse 4.2 Service Release 2 was released a few days ago (1 Mar 2013. It is the result of the all of these investigations and the patches suggested previously. Give it a shot!

John Simon
  • 319
  • 1
  • 6
0

Make sure you have turned off "show whitespace characters" on Linux. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=320595)

0

I'm using Eclipse 4.2.2 version for Developing android Apps. But its slow when coding my applications. (not XML graphical layout or Android Emulator)

I'm using NetBeans also, but it's working really well!

Specially I want to notify here I've added many more plugins to Eclipse and now I've uninstalled all of that. Now there is only ADT Plugin with Eclipse Base Plugins.

I've seen some best settings for speed up eclipse UI.

I want to know what's the best settings for my laptop.

Windows 8.1, 12 GB Ram.

at lastly sorry for posting here, I cant post any questions because I'm blocked.

I hope best solution from here.

Harsha
  • 383
  • 1
  • 8
  • 21
  • I've got some solution from surfing internet. I directly downloaded adt from developer.android site... so it's works better than previous one. But if there's best options for eclipse.ini file please post here. – Harsha Jun 08 '14 at 08:01