Performance question

Sep 25, 2009 at 6:30 PM

Hello,

I just started using LINQtoCRM and have noticed a significant amount of startup-time in my applications. I wanted to know if this may be caused by a misconfiguration on my end.

Using the Stopwatch class I timed how long it takes to create the service and query provider. It averages 6200 ms.

I also timed how long it takes to run my first query and get a single contact as a result and that takes around 3500 ms. Subsequent queries are significantly faster. Is this generally the experience to expect when interacting with Dynamics CRM 4.0?

I also read that the CrmQueryProvider is not thread safe. Is it thread safe to use multiple query providers within the same application pool? I am hoping I can create a pool to service requests in a web application.

 

Thank you
Tim Reynolds

Coordinator
Sep 25, 2009 at 8:07 PM

The slow startup doesn't have to with LinqtoCRM but with the web service, apparently because it has to JIT a lot of code. I raised the issue on stackoverflow, there are some good suggestions there: http://stackoverflow.com/questions/172095/slow-soaphttpclientprotocol-constructor

I think pooling queryproviders should work, the web service itself can handle multiple concurrent requests.

Michael

Sep 25, 2009 at 8:49 PM

Thank you Michael. I will look into this.

Tim