Application.Idle causes high CPU usage
Posted
by Neal
on Stack Overflow
See other posts from Stack Overflow
or by Neal
Published on 2010-06-12T14:30:27Z
Indexed on
2010/06/12
14:32 UTC
Read the original article
Hit count: 227
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.
© Stack Overflow or respective owner