0

I've tried so much I'm almost breaking my laptop on my forehead. But it was an expensive piece of equipment and I need it for my job, so I will try StackOverflow first.

I've got this huge Node.JS project in Eclipse. Eclipse has always been sluggish, but now it's gotten to the point where after every few keystrokes, Eclipse will freeze for minutes with the processor at 100%, often ending with some random useless error message like garbage collection ran out of memory or whatever.

Whatever it is, I don't need it to happen after every few keystrokes! Sometimes, this error message appears, with the advise to disable Template Proposals. I've had the same dialog advising me to disable pretty much everything else that is useful, to the point that Eclipse is starting to become quite similar to your next enhanced Notepad application.

enter image description here

  • Is it really so impossible to have IDE-trickery such as code assist and completion (AKA the whole reason to use an IDE in the first place) with Eclipse, even working with projects bigger than two lines of code?
  • Why would Ctrl+Space take a minute of 100% CPU when the only assist I have enabled is a handful of templates and the others are disabled? enter image description here

Please share the secret option with me that makes Eclipse usable.


$ cat /etc/eclipse.ini | grep Xm
-Xms40m
-Xmx384m
 $ cat /opt/eclipse/eclipse.ini | grep Xm
-Xms40m
-Xmx512m
$ cat /usr/lib/eclipse/eclipse.ini | grep Xm
-Xms40m
-Xmx384m
Redsandro
  • 11,060
  • 13
  • 76
  • 106

1 Answers1

1
  1. Preferences --> Editors --> Content Assist : disable auto activation. You can still use it with Ctrl + <Space> .

  2. Disable build on save for the workspace.

  3. As a last resort disable Preferences --> Validation

  4. You can Increase the memory available to eclipse by providing the -Xms and -Xmx parameters at startup for e.g : eclipse -vmargs -Xms256M -Xmx1024M. More info at the eclipse wiki.

Tejas Kale
  • 415
  • 8
  • 18
  • Thank you. Although just loading a bunch of templates should not take longer than starting an entire mission in _Doom 3_, I will try this out today and see if this fixes the problem. – Redsandro Mar 19 '14 at 09:46
  • What are your -Xmx and -Xms settings for eclipse(check your `eclipse.ini`). Increase the memory. – Tejas Kale Mar 19 '14 at 09:51
  • Oh, I don't know anything about that. I found three configs, and appended the settings you mentioned to the bottom of the question. – Redsandro Mar 19 '14 at 10:11
  • 1
    assuming you are using the repository version of eclipse, the file should be [`/etc/eclipse.ini`](http://stackoverflow.com/questions/8419099/where-does-eclipse-look-for-eclipse-ini-under-linux). Putting them in in this file would mean you don't have to specify the arguments at each startup. – Tejas Kale Mar 19 '14 at 10:47