Application.Idle causes high CPU usage
- by Neal
Hello,
I use the Application.Idle event to handle toolbar status (enable/disable) etc. quite extensively. As I'm beta testing Norton AntiVirus 2011, it brought to my attention that my app that I'm developing triggered a high CPU usage warning on at least one CPU. Sure enough, I opened the task manager and watched one of the four CPU's (quad core system) go to near 100%.
I thought Application.Idle was the way to handle things when the application wasn't performing CPU tasks. Why is Application.Idle spiking the CPU?
Here is how I attach to the event:
AddHandler Application.Idle, AddressOf OnAppIdle
Been using Application.Idle for a long time, never knew it would have this issue.
Using VS 2010 .NET 4
Thank you.