Waiting for synchronization
Bugmaster
Posts: 5
Hi all, I am trying to improve the performance of my multi-threaded Windows Forms application. I have noticed that when I switch to "Wall-clock time", the top time-waster becomes "Waiting for syncrhonization". This worries me, and I want to find out which threads are waiting on synchronization in which methods. Is there a way to do that ? Normally I'd look for the [+] icon next to "Waiting for syncrhonization" so that I can expand the node, but in my case the icon is not there, and there's nothing to expand.
Comments
Thanks for your post!
The 'waiting for synchronization' value on the main thread's call tree is actually a sum of the 'waiting' values across all the threads, so this value could end up pretty high. If you choose single threads (from the drop down menu just underneath the timeline), to view each thread's individual wait time, it should give more reasonable results!
In cases where a thread only has a "waiting for synchronization" node, it usually indicates a thread pool managed by .NET that has spawned some threads that are waiting to be assigned some work.
Just a note though: any .NET application will actually spend a lot of time 'waiting for synchronization' when viewing Wall-Clock time, but it usually doesn't indicate performance problems-the CPU usage is 0 when this is happening. Viewing CPU time normally gives the most meaningful results.
Hope this information helps!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?