[java][eclipse] UI becomes unresponsive - eclipse

I'm a seasoned software engineer and have used eclipse for well over 10 years. In the last week, Eclipse has decided to rebel against me. I'm dumbfounded.
Problem: I'm getting periods of very long UI unresponsiveness - on the order of 3 to 10 seconds. Generally, I'll be typing when the UI just stops writing text. It can vary from displaying spinning circle to not rendering anything in the window. Workspace building also slows down significantly.
I'm pulling my hair out trying to get tasks done! Any help appreciated.
Details:
It appears to start 10 minutes or more after starting eclipse. If I restart, it'll be ok for a few minutes.
This can happen in during any text entry. Though it's especially bad on code completion cases (i.e. "dot, cmd+space). Eclipse can also become unresponsive during anything else (moving the cursor, changing tabs, scrolling, etc).
CPU is not maxed out, though it appears CPU is pretty consistently at or over 50% - so maybe eclipse as pegged one thread/core?
Things I've Tried:
Updated from Neon.3 to Oyxgen.2. Deleted all projects from workspace and reimported. Upgraded memory in ini to -Xms512m -Xmx4000m -XX:PermSize=256m
-XX:MaxPermSize=512m. Deleted some metadata from a eclipse resource dir (don't recall which). Updated Java. No change. Haven't tried uninstalling all eclipse and reinstalling yet.
Setup:
Windows 10 Home (up-to-date), 12GB RAM, 64 bit, Oxygen.2 (4.7.2)

How large is your project? Do you build using Eclipse, or do you build externally?
If you notice a progress bar in the lower right side of the GUI during these periods of unresponsiveness, it's likely Eclipse's Build Automatically feature causing your issue. If so, it can be disabled under Project -> Build Automatically.

Related

Eclipse Neon Pathetically Slow

Is there a way to identify what's going on with Eclipse when a file is saved?
My eclipse runs extremely slow (takes close to 3 minutes to save a file). Simple addition of a space in a file and save, it keeps saying 'Updating Navigator Content Viewer' and 'Remote System Explorer Operation' and simply freezes.
I am running on a powerful system with 16 gigs of ram and assigned 1 gig for eclipse. The way it performs is simple unacceptable and planning to switch all my projects to NetBeans rather than wasting hours on save.
Any hints on fixing this are appreciated.
Finally resolved the issue by getting rid of Eclipse.
Moved all my projects to NetBeans 8.2. Its a big relief to see my projects getting saved in a split second.
Coming to Eclipse, it is powerful and exceptional on all aspects other than the slowness during save. However, this frustrating issue alone makes me rate Eclipse 1 (may be 0) on a scale of 10. Cannot expect a developer to wait for 2 minutes to save a file (on a 16 gig system, with 4 gigs assigned to Eclipse) which would drag the productivity drastically.
Looks like this issue is not something new as I have seen many posts on various forums regarding the same. I don't understand how Eclipse never gave a thought on this slowness issue.
First you should try to look at this post so:
Check if it is the latest version (I personally run Neon 4.6 and it takes about 2 minutes to parse and save a 55MB file)
Check your JDK/JRE
You should also try to see if it doesn't come from your drive...
If you still have the problem, I suggest you look at the other Eclipse versions (Mars...)

Eclipse Neon Hangs on Save

Is it common that Eclipse Neon always hangs on saving a file?
I work on a 16 Gigs, Windows 7 system and allocated 5 gigs of memory for eclipse. Still when I save a file within my project, its a nightmare. It takes almost 90 - 120 seconds to let me control again. Its extremely pathetic and annoying. I believe NetBeans is far advanced and easier to use. I have tried all possible solutions to optimize the performance and eventually considering moving the entire workspace to NetBeans. Any comments are welcome. The below message keeps appearing on error log.
Got the issue resolved. Removing all the break points resolved the issue. Now save happens in less than 1 second.

Launching a Project in Eclipse

I am trying to run my projects in Eclipse, whenever I used to run any program a window appear and it shows that project is launching and building.
This never happened before. In fact, it was working very okay an hour before but now, even for old created project it showing this and not moving ahead.
Is this a general thing happened in eclipse as I haven't seen this before.
I want to get out of this to move ahead and to run the project.
The Launcher looks like this :
The progress Bar is also not moving ahead if it's building the project.
It's definitely normal to see; there's times I'll see it two or three times in a day. It shows up if the launching process is waiting on anything or is expected to take more than a couple seconds.
In your case, it seems to be stuck on "Building workspace," which happens when you open Eclipse. The more projects you have in Eclipse and the more sections of workspace you have (groups of tabs), the longer it takes to build your workspace. So I'm going to wager a guess that you tried to launch a project within the first minute or two of Eclipse being open. Am I right?
If that's the case, just wait a bit, and watch the lower right corner (where it says "Launching Clock" in your screenshot). When it shows it's stopped trying to do start-up tasks, you should be good to go.
If Eclsipse had been open for a while, then perhaps Eclipse is busy with other junk and calling it "Building workspace." Maybe it's having a hard time understanding what to do with one of your projects, so check for compiler errors. You can also try to "clean" your projects (Project -> Clean).
If that also fails...hmmm...I'm sure there's other options before you get to this point, but you might need to re-install Eclipse. I suppose there's a chance that in the deep dark corners of Eclipse, a file was corrupted, causing Eclipse to hang on a task that requires a missing/bad file. But before you go this far, make you get second or third opinions, because I might be missing some simpler cause of your Eclipse hanging than what I've listed already.
I found the solution.
I don't know what was the error and why it was displaying the Launcher window and stuck there. But, I forcefully stopped eclipse using Task Manager and then restarted it.
When restarted it took few minutes (more than usual time) and I was done with it. now it's working okay.
Re-installation of Eclipse also worked but i tried this before re-installing or upgrading.

Is there a way in Eclipse to determine what is eating CPU time?

I am using Eclipse for Java development. I have a number of plugins (Maven, Subversive, JBoss reverse Engineering tools, etc), and the system seems to hang fairly consistently, to the point where it can be 10-20 seconds from a mouse click until it responds. I have given it a gig of memory in the configuration, and it is not even using half of that. When it hangs, it completely pegs one of the processors, and I see large numbers of Page File Deltas.
Is there any way to see what is happening inside Eclipse? Which plugin could be causing the problem?
I believe (although I am not positive) I am running Eclipse 3.5.2. I am running on Windows XP, SP 2 or 3 (I do not manage the machine, my company does, so I am not positive how up to date it is).
First, the one plugin that can help investigation this would be MAT (Memory Analyzer).
Full tutorial at Vogella.
Second, make sure to use an optimized eclipse.ini launched with the latest JDK (6u22) and check if the issue persists then.

Eclipse: High CPU Usage during Autocomplete

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".
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.
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.