PDA

View Full Version : ow to remove spontaneous events from application?



barrygp
6th October 2010, 13:08
My application CPU usage is high even while just sitting there with no activity, and increases with mouse hovers, etc. Is there a way to limit external events from the application? I do not want to disable all event as I do have a user interface, but would like to limit the cpu usage when the app is idle. I believe this is from spontaneous events, if so how do I catch and remove at the application level, and if not spontaneous event, what could the issue be?

thanks. barrygp

tbscope
6th October 2010, 16:21
You can always install an event filter.

However, I believe this is absolutely not the correct way to deal with this problem as holding back events might result in unknown behavior.
The correct way to handle this is find out why hovering the mouse over an object increases the cpu usage and than try to keep it down. In other words, are repaints and animations really necessary to the workflow of the program?

wysota
7th October 2010, 03:23
If you are using Graphics View then such slowdowns might be the effect of incorrectly defined bounding rectangles for items and accepting hover events for too many items.