I am using force.com IDE and I am facing extremely slowness in saving a file to the server. It seems to take too much time to save apex classes or visual force pages that i need to cancel the operation and do it second time which works. Any suggestions on this please? Thanks Buyan
Yes, the Force IDE and Force Eclipse plugin are notorious for being slow. There are various options to create a faster workflow:
- If you have OSX and like SublimeText 2 check out MavensMate: https://github.com/joeferraro/MavensMate-SublimeText - amazing force integration and great speed
- In any environment you could use Ant for deploying and retrieving items from your environment, you can google how to set it up. This will probably be the fastest way to deploy code.
The slowness of the force.com IDE is due to overhead that comes along with using Metadata API, which the Force.com IDE is written on top of. In addition to this overhead, the Metadata API also requires polling to get results back, which adds a small delay.
Newer IDEs such as ASIDE.IO or Mavens Mate are significantly faster because they are using the Tooling, Apex, and Partner APIs to save code to server. Additionally, there is a rewrite of the Force.com IDE underway that should alleviate the slowness.
This is a fairly common
complaint observation. An operation that might typically take seconds (less than a minute) will seem to go on indefinitely.
Firstly, check that no other admin actions are currently occurring in the Org that might block the action. E.g. running unit tests.
One option is to just grin and bear it until the IDE plugin is refreshed with the Tooling API and hopefully improves the situation.
You could look to alternative methods of working with Apex, such as the Developer Console or another third party tool.
I haven't had much luck, but there is a Force.com IDE Log Viewer in Eclipse (Help > Show Force.com IDE Log). It might provide some more clues as the why the IDE is hanging.
There isn't going to be much you can do about this. The time to compile apex classes and visualforce pages affected by the server load, the distance between you and the instance, and the complexity of your orgs.
I've seen some worst case scenarios where saving an apex class took up to 5 minutes. However, this was an extreme case where an org had FinancialForce installed and each compile required the back in server to query all apex classes regardless of whether they were referenced. They had a fix targeted for Winter '13, so if you're having saves that take that long you may want to contact Salesforce support.
Checking out less metadata in Eclipse is what I have done in past to get speed improvements during file SAVE operation. I posted this long back, and still works well for me:
(Help > Show Force.com IDE Log) is the right place. Only thing is its not showing the detail errors as its shows in the Salesforce.com editor. So, try editing the file directly on Salesforce. This happened for me when my edit has actually caused an error. Its a general Salesforce behavior not to save the files when there is any validation error.
I use force.com ide strictly for editing and testing. When it comes to deployment even saves to my sandbox I use ant. Force.com IDE was ridiculously slow at times to save even a small file to salesforce. Ant works consistently fast and even when it's slow it's still considerably faster than force.com ide