You need to sign in to do that
Don't have an account?

Time required in seconds to insert a singlle opportunity
Hi,
We would like to know the standard time required to insert a single opportunity using apex api from c# web application.Is this time in seconds or miliseconds.
Currently from our application it takes 3-4 seconds to insert a single opportunity and get the result back.
Amit Lohogaonkar
The time to insert a record in force.com is milliseconds. Included in that span is the time to send the request and recieve the response.
I would take a look at any setup and tear down that may be happing on the stub (initialization, login, etc) and make sure that you are taking advantage of compression.
One way to do this is to wrap the sforceService class and make it static. Create a property to retrun the "binding". In the property check to see if it is logged in and if not, then do a login before returning the binding, otherwise just return the logged in binding.
It's also a good idea to account for session timeout in that wrapper. Record the time of the login and calculate when the session will expire. Use that calculated value in your binding property getter function so that in addition to checking for login, you can check to see if the login may be close to or has passed the expiration time. If it has, then call the login function again to refresh the session before returning the binding.
Cheers.
.NET 2.0 allows you to pre-compile this stuff at build time instead.
Other interesting causes i've seen with slow round trip times is if your primary DNS server is down, in which case when the code trys to resolve www.salesforce.com / nax.salesforce.com to an IP address, it has to wait while it decided to give up on the primary and try the secondary.
Then there's basic networking stuff, are you using compression, how much bandwidth do you have etc.
Thanks DevAngel, Simon for a valuable response.
We will look into all things you mentioned to check if it causes some time delay.
Regards
Amit Lohogaonkar
amit@varstreet.com