Slow development

When I am developing sometimes my eclipse hangs or takes 8 mins to push a change. IT really slows me down. It can take a long while to run tests.

I sometime run tests in the browser to speed things up.

What tips do you have to speed up development?

Answer

Alternative Options

In lieu of using Eclipse, a much better option (IMHO), would be to use maven’s mate with Sublime Text. Sublime Text has way better text editing features, and with maven’s mate you
get all the features of Eclipse.

Eclipse Speed Discussion

A couple common reasons for a slow Eclipse Force.com plugin that you might take a look at.

1) You’re working on a production system

In this case every save you make (with some exceptions) is performing a production deployment which means Salesforce runs all tests in the org. Instead of coding against production you’ll want to use a sandbox to make your changes and then deploy to production once you’ve got things where you like it.

2) The Force.com plugin has a bad (IMHO) polling algorithm

The way a save in Eclipse (and all tools) is asynchronous. Meaning that one message is sent to Salesforce with the data, and then Eclipse polls back ever so often to see if Salesforce is done. The algorithm for this sucks and works by doubling the timeout. Meaning that after a couple polls the wait time before it checks again rapidly increases and you’ll be waiting for a long time for something that is already done (see @surfous’s answer for an example). You can see the number of polls in the progress section.
enter image description here

Personally, if the number of polls increase above 13, I cancel the save (by clicking the ‘stop’ icon) in the progress log and then re-save the resource after making a fake edit (i.e. add a character then delete it). The second save won’t really be doing anything, but if you do get a failure it’ll typically get it quicker the second time (as well as a success). To see the REAL time it takes to do your save login to the org and go to setup->deploy->monitor deployments and you can see if your stuff is in progress.

3) Eclipse does a lot of under the cover blocking network actions

When files open in Eclipse something happens that involves a network communication. I believe it’s loading all the orgs objects and fields to initialize the auto-complete. Sometimes that operation can be super slow and your stuck waiting for a while until your editor loads.

4) You don’t have enough memory

Eclipse is hardly shy about consuming resources. If you have a computer with a small amount of RAM Eclipse is just going to be slow, period. If it starts running low on memory it gets REALLY slow. You can monitor heap usage in Eclipse to see how much you’re using (instructions). You can also change the max amount of memory eclipse is allowed to use (instructions).

5) Your deployment actually is really slow

In some cases Salesforce just takes forever to process things. For one client I ran into situations where EVERY save to a VisualForce page took several minutes to save. We logged a case with support and a bug was filed, but as far as I can tell people still run into really crappy performance now and again. In these cases you should contacts support and let them know about the issue.

Attribution
Source : Link , Question Author : More Than Five , Answer Author : Ralph Callaway

Leave a Comment