Application hangs for several seconds on idle CPU

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

Hello folks,

I am trying to analyze a problem where my application will - for no
appearent reason - freeze for a few seconds on an idle CPU. It occurs when I
switch from another application (it can best be reproduced when switching
from Remote Desktop Connection, sometimes it also happens with IE).
There's nothing special my application would do when it receives the focus.
It is, however, a very large and resource-hungry beast, in case memory
management might play a role in this.

What I am looking for is simply some ideas how I might approach and analyze
this problem. Any hints appreciated!

Thanks

Robert
 
Found the cause of the problem: I was calling SetWindowPos to a window
within another thread (intentionally). When doing so asynchronously (using
the SWP_ASYNCWINDOWPOS flag), the application no longer freezes.
 
Back
Top