[SalesForce] Deployment with Force.com IDE Taking Forever

We're experiencing extremely long deployment times even when deploying single classes using the force.com IDE plugin to eclipse. The deployment takes up to 1 hour yet running all unit tests from the web GUI takes a few minutes.

During deployment the eclipse.exe process uses 25% CPU but we don't know what it's doing. We enabled a debug log in the Web GUI for our user but nothing was logged during deployment.

How can we speed things up?

How can we profile what is going on?

UPDATE: I deployed a class by editing it directly on the production server in eclipse. The save takes forever again but I noticed in the web GUI that the class is deployed and the deployment (under Setup -> Deploy -> Monitor Deployments) is complete. So basically eclipse hangs for 1 hour after deployment for no apparent reason and nothing helpful in the logs.

Possible solution: wait till deployment is finished and kill eclipse!

Best Answer

When you deploy any Apex at all, even one class, all of the test methods in your org will run. Depending on how much Apex you have, how much test data you generate, this could take a long time.

To speed things up, there are some options you have such as reducing your bulk test batch sizes (for instance if you are testing 200 records, try reducing that to 100).

Related Topic