ToTraceString takes a long time to execute

I have a service that runs a request through Entity Framework 4, and it has no problem until I tried to run it on Windows Server 2003 with IIS 6 or Windows 7 with IIS 7.

Now, when I try to start the same service on Windows Server 2008 R2 and IIS 7.5, the same request becomes very slow (from 200 ms to 3 seconds). Analyzing the problem, I found that it takes so long when trying to generate an SQL query to execute, just calling ToTraceString () takes almost 3 seconds.

I do not know if there could be a problem with the OS and IIS, but these are the only differences that I see.

thank

Update

I found out that the problem is effective at the time that the Entity Framework takes to generate a request, and it depends on the processor, it works very well with Intel, it is much slower with AMD, and it gets worse if the application works with multiple cores , forcing w3wp to use one core, it’s getting better, but still slower than Intel’s solution

+5
source share

All Articles