Eclipse getting too slow - workspace recreation he

2020-05-20 05:02发布

问题:

My Eclipse was getting slower and slower over time. Tips I found on the Internet did not help. What I did is completely deleted my workspace, created new one and reimported all my projects into the new workspace and this really made the difference.

So my question is whether it's possible to perform this workspace clean-up without deleting and recreating workspace... Maybe there is some cache in workspace which is getting big? Any ideas?

Thank you!

回答1:

Eclipse keeps track of all changes in local history. That might introduce slowdown over time. Local history is located at .metadata/.plugins/org.eclipse.core.resources/.history.



回答2:

Not sure about newer versions of eclipse, but in 3.1 settings in

Preferences->General->Workspace->Local history

did not work for me. I had it set by default to 7 days but files were kept for 4 years. And I guess other people here had the same issue.

For me it helped to remove history files manually from

.metadata/.plugins/org.eclipse.core.resources/.history.


回答3:

I use RAD 7.5 (which is based off of Eclipse 3.4). I found several of my projects had millions of history files, all older than 7 days, and mostly the same dummy MANIFEST.MF file (39 bytes).

I discovered this when I tried to delete an old project with Windows Explorer. After 12 hours, Windows Explorer reported that it had recycled 3.5 million files, and was still working.

I found the only way to remove the workspace was to open a Command Window, CD to

<project>\.metadata\.plugins\org.eclipse.core.resources\.history

then type

DEL *.* /s/q

Even this took the better part of an hour.



回答4:

Try running eclipse from command prompt with

eclipse.exe -clean

More http://www.myeclipseide.com/PNphpBB2-viewtopic-t-10280.html



回答5:

Sometimes due to Physical Memory issue it cant build the workspace. So To remove Memory issues update @

eclipse.ini

file as below

-Xms512m
-Xmx1024m
-XX:MaxPermSize=1024m
--launcher.XXMaxPermSize 1024m


回答6:

I just solve the problem by deleting all stuffs inside eclipse's directory OPTReplica. after that, re-stat eclipse, for me it helps.



回答7:

Eclipse is programmed as a filebomb, and it causes a large variety of problem, evben on modern robust filesystem. Problem can goes from large waste of diskspace for nothing to preventing your OS to boot if your workspace is on your OS partition. Eclipse is programmed as a filebomb.

The cleanup mechanism in eclipse doesn't work, so the only viable option is to frequently cleanup your workspace by hand at regular interval, or to add your cleanup code to a sh file that does it before launching eclipse.

An other option will be to introduce the eclipse developpers to the fabulous world of databases that produce faster to run and easier to write code. Sadly a rhumor says that they will shot on sight everyone that pronounce the words "sqlite" or "jdbc", and will sacrifice virgind every sunday to the all-mighty-god-of-filebombs.