function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JWykelJWykel 

Slow Initial Connection

I found this thread:  Link 

It sounds like what I am experiencing, but I could not figure anything out from the answer at the bottom.  

I have a desktop application using a Web Reference with the Enterprise WSDL.  The initial connection (login) takes anywhere between 8 and 20 seconds; every subsequent request is very quick.  Is there any way to eliminate this long delay upon the first connection?

 

My Googling has failed finding any settings that the post mentioned or even more generalized searches trying to figure out why the initial connection might take so long or how to fix.

 

Any help would be greatly appreciated!  

Thanks.

Satish_SFDCSatish_SFDC
As you know .when you compile a .net application, Intermediate language is generated and this in-turn is converted to machine language during runtime. This conversion from IL to Machine language might take some time which may result in performance issues.

There is a tool which can convert your source code to Native or machine code during compilation, so there is no conversion done during runtime. (NGen)
http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx

What SimonF says on the other post is that this direct compilation to native code can significantly improve performance as there is no need to convert all the XML serialization/deserialization during runtime. Instead they are done during compile time.

That said, usually it takes around 10 seconds in my case for my .net/java apps to connect to during the first hit.
I did not try SimonF's suggestion but that may work.

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.