9

I've been using Eclipse without issue (I mean, besides the usual) for several weeks now. It's been speedy enough for my purposes. But as of today around noon, anytime I start typing an HTML tag or other autocomplete-able element, my whole System bogs down so much it's completely unusable. Watching in Task Manager, I show that Eclipse jumps from 0 up to 10-15% every time I type a "<" or ">" symbol!

I have a Core i7 PC with 6 GB of RAM, so this definitely isn't a system specs limitation. I've also uninstalled a couple of programs I installed today hoping maybe one of them was conflicting, but no dice. Even after a restart, I am unable to use Eclipse without pausing for several seconds every time it tries to auto-complete!

Anyone know what's going on here? I did some searching but all I found were VERY old bug reports that say the developers "are aware of the issue and are working on a solution".

Brian Lacy
  • 18,785
  • 10
  • 55
  • 73
  • What about the system specs of the eclipse VM? They are in the eclipse.ini file of your eclipse folder. – greg0ire Nov 09 '10 at 22:54

2 Answers2

10

First, I'd try bumping up the memory that eclipse has allocated to it:

-vmargs
-Xms2048m
-Xmx3072m
-XX:MaxPermSize 128m

That should be in your eclipse.ini file. This blog has some great reading as far as memory and Eclipse are concerned. Also you can read this lengthy SO thread if you need some more info and / or wish to induce sleep.

Next, try speeding up autocomplete. Go to Window / Preferences / Java / Editor / Content Assist / Auto-Activation and decrease Auto activation delay from 500 to zero.

Finally, you might look into hippie complete; the default key binding in Eclipse is 'alt-/' . This is also called "Word Completion" if you check out the shortcut list 'ctr-shft-l' ( that's L as in list ). On my mac the default key setting is 'ctr-.' . This is a faster version of autocomplete that I believe harkens back to the days of emacs. It seems to work great with local variables but not so great with functions on objects. Different beast I guess.

As a bonus, you can check here for a list of ways to speed up the Eclipse experience in general.

Community
  • 1
  • 1
Stephano
  • 5,716
  • 7
  • 41
  • 57
  • @zvikico: I'm not sure what that link has to do with memory usage in Eclipse or .ini settings; it appears to be a series of examples for building dialog boxes with SWT-JFace. – Brian Lacy Nov 10 '10 at 15:52
  • @Stephano: My only concern about your suggestions here is the fact that everything was working just swimmingly until yesterday around noon. I don't really want to change settings, I'd rather figure out what happened (or at least find a nice silver bullet) and fix this new problem. – Brian Lacy Nov 10 '10 at 15:54
  • Sorry for the wrong link. I still think it's way too much RAM. You'll end up just swapping all over the place :-) – zvikico Nov 10 '10 at 19:54
  • @Brain That is a valid concern. One of the biggest problems that I had with windows was my inability to hunt down the "sludge" that slowly overtook the OS. Seems like my clean installs of XP were great, and as I used the machine, it would grind to a snails pace. Best of luck in finding the issue though. If all else fails, try some of those hints; they just might do the trick. – Stephano Nov 11 '10 at 04:53
  • I increased the memory allocated in eclipse.ini -- not as much as you suggested, but enough that I could be sure that wasn't the cause of the problem. It didn't solve the sudden lag and CPU spike. However it does seem to help it recover a bit faster, which is better than nothing. – Brian Lacy Nov 11 '10 at 18:09
  • @Brian glad it helped. Sorry I didn't have more of an actual fix for you. Cheers. – Stephano Nov 12 '10 at 21:31
2

First, just as a test, try switching to a new workspace (File → Switch Workspace → Specify a folder which does not exist, it will be created).

If the problem is solved, this could be an issue with some bad settings or cache in your current workspace. If you can easily move to this new workspace (don't know how much effort you've put in customizing your workspace), I'd do that.

If you want to fix your current workspace, go into the .metadata/.plugins folder of your workspace, and look for folder that start with org.eclipse.wst. I'd try to take them out, and see if it helps (close Eclipse first). You may lose mostly history and cache in the process. You can check the folders specifically and intelligently guess what should stay.

If the problem is not solve by changing workspace, I would try downloading a fresh copy of Eclipse. You could try to reset the configuration folder, but that's a bit risky. If it's too much trouble, I'd start fresh.

zvikico
  • 9,765
  • 4
  • 38
  • 49
  • This was a really good idea, but I even tried downloading a fresh copy of Eclipse AND using a fresh workspace, to no avail. It seems I am just doomed to lose 5-20 seconds every time I want to open or close an HTML tag. I've been shopping for alternatives to PDT but so far nothing meets my needs. – Brian Lacy Nov 11 '10 at 00:26
  • You didn't mention that you use PDT. Check out my answer to that question: http://stackoverflow.com/questions/4041156/eclipse-pdt-is-freezing-from-time-to-time – zvikico Nov 11 '10 at 05:26