Force.com IDE: Improve the performance of Force.com Eclipse IDE

Salesforce developers spend lot of time waiting for file Save operation to finish. This is a big problem for developers working on big Force.com projects which includes large number of classes, pages, objects and components.

I recently found out a way to boost-up the save and refresh speed on Force.com Eclipse IDE. The secret to improve perfomance is to checkout only selective Metadata components for a project. By default, when we create a “New Force.com Project” in eclipse, “triggers, pages, classes, components and static resources” everything gets downloaded.You don’t need static resources locally in your workspace so their is no point of downloading them.

So the key to note here is that, if you know you are going to work with classes and triggers, then only checkout “classes and triggers” when you create new force.com project. This will significantly improve the save and refresh time for the project.

Salesforce Developers fall into one of these categories:

1)Developers who work on SFDC “point and click” customization using Salesforce Web interface and use Force.com IDE to write Triggers and Apex classes only.
2) The second type of Developers are “Faithful Force.com Developers”: They do everything using Force.com IDE i.e. writting classes, triggers, apex/visualforce.

Developers who use Force.com IDE for creating Triggers:
As said earlier, these developers do most of the customization using Salesforce Web interface and use Force.com IDE for writing Triggers and classes. So they don’t need to checkout the default meta-data components which downloads everything including classes, triggers, static resources, pages, and components. Instead of checking out default components, we can download specific components like “triggers and classes”. The way to do is shown below.

Step 1: Create a New Force.com project. Provide username,  password, security token etc. Click Next button.

Step 2: On the next screen, choose “Selected metadata components ” and click Choose button next to it. Do not select the default option “Apex and visualforce”.

Step 3: You will see a progress bar. Wait for it to finish. The Force.com IDE is preparing a list of metadata components.


Step 4: In the next screen, you will¬†see a list of metadata components to choose from. By default, everything is unselected. Just select “triggers and classes” as shown below. Click “OK”.

Step 5: You will see a new Force.com project in your Eclipse IDE with only two source components i.e. Classes and triggers. The refresh and save operation will be relatively faster.

Faithful Force.com Developers:
I said Faithful because these are the ones who are doing more than point and click customizations on Force.com platform. These are the ones who create classes, visualforce pages, components, complex triggers etc.

There is not a big difference in the approach. The key is to create a “Trigger + class” project as shown above.In addition to that, you need to create a ” Pages + Components” force.com Project for the UI stuff. To create “Pages + Components” project is very similar, now we need to select “Pages + Components” as well.

You will see two projects as shown below.


Let’s say you are part of a huge project and you are working on selected classes, and components. My recommendation will be to choose the selected classes you work with. This will improve the save and refresh speed tremendously.

 


In the above screenshot, I selected 5 classes that I work with. And the project has more than 100s of classes. Similarly, I can download selective pages and components. Using this approach, you will see a significant improvement in “refresh from server” and “save” speed as well.

The only drawback with this approach is, if you need to search some code reference in all classes/pages/components since we have selected specific metadata now, we might miss some of the classes/pages/components etc. The solution to the problem is to checkout all the components in one single project and use it for search reasons.

Leave a Reply

Close Menu