tags:

views:

282

answers:

5

I am doing TDD on a large Java project in eclipse and am finding it frustrating because every time I run a test I have to wait 30 seconds+ for eclipse to compile and refresh. I estimate that 80%+ of that time is spent refreshing.

Is there a way I can drastically reduce the amount of refreshing it is doing? I have looked at server other similar questions but I could not see anything that helps.

One way I reduced the compile refresh time was to split the unit tests and code into separate projects. There are 4,700 classes in the src project and 300 in the tests. I am running eclipse 3.5.1 on Java 1.6.0_17-b04 (eclipse.vm). My computer is running windows xp with 3.1 gigs of usable ram. The only plugin I have installed is subclipse.

+4  A: 

I significantly increased the performance of Eclipse under 32-bit Windows by creating a RAM disk using the portion of the OS-unadressable memory as illustrated here.

If you have (or can increase to) 4GB of ram from your current 3.1 the same approach will quite possibly help you.

Eric J.
+3  A: 

Have a look at the post I made here about eclipse.ini options: http://stackoverflow.com/questions/2204173/eclipse-ide-speed-sluggish-on-snow-leopard-macbook/2204456#2204456. Some of these might help you as they can adjust Eclipse environment settings (allocate more memory, etc). Also consider migrating your workspace to a faster disk :)

Chris Dennett
The b04 is the build number, not the beta version.
Nash0
Oops, sorry -- edited post.
Chris Dennett
+1  A: 

This could definitely be memory related. See one of:

They both give a good overview on Eclipse memory configuration, which I think will at least help with this issue.

stevedbrown
A: 

I read the post mentioned in the other answers before asking this question and they did not help. After talking to several people and spending 3-4 hours searching the web it does not look like this is easily solvable using Eclipse.

This problem does not occur in IntelliJ so I am switching to it. I am actually very surprised how good the free version of IntelliJ is and would strongly recommend giving it a try. Eclipse is good but IntelliJ is a lot more polished.

Nash0
A: 

It turns out there were build errors in the project that did not affect the tests or the code I was working on but were there none the less. When I resolved all build errors in my eclipse workspace the issue with long refreshes when away. This was tested on eclipse 3.5 and 3.6.

I feel a little foolish now :(, but from what I have seen professionally there are a lot of people with lingering IDE build issues.

Nash0