21

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!

Daniel
  • 249
  • 1
  • 2
  • 4

7 Answers7

30

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.

rustyx
  • 80,671
  • 25
  • 200
  • 267
  • Thanks for a quick reply. Can I completely remove that .history folder without any risk? – Daniel Dec 08 '10 at 10:31
  • 17
    Yes, but I recently found out that you can reduce the number of days to keep in history, such that the history doesn't grow too big. (Preferences->General->Workspace->Local history) – rustyx Jan 07 '11 at 09:52
14

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.
Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
Julijus
  • 141
  • 1
  • 2
4

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.

user980717
  • 251
  • 1
  • 9
2

Try running eclipse from command prompt with

eclipse.exe -clean

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

Boris Pavlović
  • 63,078
  • 28
  • 122
  • 148
1

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
Hasnain Ali Bohra
  • 2,130
  • 2
  • 11
  • 25
0

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

vivi
  • 334
  • 2
  • 13
0

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.