Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ScatterDraw & ScatterCtrl » Dynamic example - 100% CPU core load
Dynamic example - 100% CPU core load [message #48670] Tue, 15 August 2017 17:31 Go to next message
coolman is currently offline  coolman
Messages: 87
Registered: April 2006
Location: Czech Republic
Member
Hi,

I have a question regarding the dynamic example in the ScatterCtrl_Demo. After a while the CPU load of one core is at 100%. Do you know the reason for that?

Thanks, Radek
Re: Dynamic example - 100% CPU core load [message #48676 is a reply to message #48670] Mon, 21 August 2017 11:24 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Dear Radek

ScatterCtrl_Demo/Dynamic tries to update the plot every 5 ms.
Depending on the computer, compiler options (debug - release) and painting mode (Painter - Draw), the update is done faster or slower, and CPU load varies.

If you change line
SetTimeCallback(-5, THISBACK(Animate));
changing -5 (5 ms update) with 500 (500 ms update), probably your CPU load will be about 0%.


Best regards
IƱaki
Re: Dynamic example - 100% CPU core load [message #48721 is a reply to message #48676] Mon, 28 August 2017 17:56 Go to previous message
coolman is currently offline  coolman
Messages: 87
Registered: April 2006
Location: Czech Republic
Member
Hi Koldo,

Thank you for the explanation. The CPU load is much lower with release build. And it's good to know how to modify CPU load.

BR,Radek
Previous Topic: Use function pointer
Next Topic: PieCtrl and GetImage
Goto Forum:
  


Current Time: Tue Dec 07 16:38:31 CET 2021

Total time taken to generate the page: 0.01159 seconds