Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Error - Processor Utilization Problem

Status
Not open for further replies.

sOlsTiCezA

Programmer
Mar 20, 2002
17
ZA
Hi,

I am using a toolbar connected to actionlist actions. I also have a timer component on the form. The interval for the timer is set to 2. if the timer is enabled, my processor utilization shoots up to 100% ( P2 300 Mhz). If I make the toolbar invisible, utilization is at 3-7 %. If i remove the link to the actionlist actions from the toolbat buttons, utilization is at 3 - 7%. If I remove all the code that the OnTimer event executes, utilization is still at 100%, but if I remove the ontimer event function completey, utilization is at 3 - 7 %.

Please help, all suggestions welcome...
 
It's possible that if components are being displayed or refreshed 500 times per second then that could be taking plenty of resource. I have found that Delphi invokes routines that you were not expecting, or in a strange sequence. Hiding things can of course avoid display code doing anything so the utilisation falls.
What happens if you set the interval to higher values?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top