views:

1509

answers:

3

Hello all,

New to Java and Eclipse. For some reason, the first time I load Eclipse on a given day, it freezes at "Initializing Java Tooling : 59%". Eventually, it gets past this and I can do my work. However, this "Initializing Java Tooling : 59%" stage takes a REALLY REALLY REALLY long time. Does anybody know why it does this or how to fix it?

+4  A: 

You can take several thread dumps of the Eclipse Java process to see what plugins are being executed. Here is some info on how to take thread dumps.

What happen is that Eclipse loads all project configurations and then for each project it initializes all declared builders. The builder loading and initialization is what takes most of the time. Some builders need to resolve and/or reload project dependencies such as jars and other projects and also check if project resources had changed. This process can also trigger initialization of builders on other projects and it may take longer depending on 3rd party plugins you are using.

Eugene Kuleshov
A: 

A more simple-minded approach than Eugene's very clever one is to remove all your plugins, one by one, keep notes, and watch performance after each removal. This should help pinpoint the plugin that's doing the big initialization. It's possible that you didn't really need that plugin after all.

In my experience, there is often a big delay associated with source control plugins because some feel the need to check project state against the repository on startup. There may be options to control this. You can also look at what kind of label decoration is in effect; if some decoration is dependent on repository state, that could be your time waster right there.

Be warned that this procedure may be destructive! You probably included those plugins for a reason, and if you remove the plugins it's possible you'll lose capabilities on already present projects, and that even replacing the plugins will not necessarily restore everything in all projects to the former state. As the disk repartition people say: We assume that you have everything backed up!

Carl Smotricz
Recommend you save off a copy of your eclipse folder and workspace folder before the test so you can restore it after you find the offending plugin.
Chris Nava
Interesting. I do indeed have a source control plugin. Anybody ever have this issue with the Perforce plugin?
A: 

It breaks on a per workspace basis. I have had some success removing plugin data. Usually this can be found by at:-

[workspace-directory]/.metadata/.plugins

If you delete everything except:-

org.eclipse.core.resources

You will keep your projects but everything else will be deleted (preferences, scm repositories ... etc.) and will need to be recreated/reimported (you will be greeted by the welcome page, but do not be alarmed).

There is probably a specific set of plugin data that should be deleted, but this fixed my last occurence, and so I have nothing else against which to further hone in on the problem state ... for the time being.

mike g