-
Notifications
You must be signed in to change notification settings - Fork 337
Description
I use AvalonDock for my game editor. As long as I can remember, I've had issues with my PC slowing down after running for a day or two straight. Eventually it got worse to the point my mouse would get so slow it was unusable, and strangely caused a beeping sound through the speakers (not motherboard). I figured it was a hardware issue, possibly USB conflicts and spent months troubleshooting by swapping out devices etc. Eventually I ruled out hardware after I built a completely new computer and tried swapping out every USB device. I finally started searching for the problem in relation to Visual Studio and happened upon this article that mentions the same exact issue:
http://the-witness.net/news/2012/12/finding-and-fixing-a-five-second-stall/
He said it completely cleared up after a few seconds, but on my machine it would be much slower than normal after becoming somewhat usable again. Long story short, the culprit was SetWindowsHookEx that they used to hook into keyboard changes so they could ignore the Windows key while the game was open. I knew I wasn't using that on the game side, but after searching through the editor I found a spot in the AvalonDock using it for focus changing events. I disabled the hook and suddenly after YEARS of issues my PC is running beautifully with the editor open for days straight. Is there some other way to achieve the same functionality without using SetWindowsHookEx?