I am using dotTrace Performance 4.5 to profile a .NET 3.5 C# web application. When I record one "user request" (load of page), I see 11 threads with approximately the same timing, 7644 ms.
Microsoft.VisualStudio.WebServer.WebServerApp.Main(String[])
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object)
PerformWaitCallback
(1094 ms) >> 12% = ProcessRequest
Can you tell me:
PerformWaitCallback
?Why are there so many threads? (images resources, AJAX, JavaScript)
The web server creates a thread pool to manage incoming requests, and there are a number of threads in the pool.
What is PerformWaitCallback?
Don't know for sure, but it looks like the code that waits for a thread pool thread to complete its task.
Why 7644 ms for only 1094 ms of work?
It looks like the profiler is counting the time that some threads are spending waiting for new work. I haven't used dotTrace, but most profilers have a way to configure them so they can identify when threads are waiting vs. working -- based on the info you posted, I suspect the profiler isn't configured quite right.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With