50% CPU during Demo app

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: 50% CPU during Demo app

Post by hybrid »

Actually the demo doesn't have any such mechanism. But it allows to enable VSync, maybe that's what you noticed? This means, the FPS is limited to 60FPS (or whatever your refresh rate is). And thus, it won't do more render work than necessary, pausing otherwise.
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Re: 50% CPU during Demo app

Post by vectorcorpse »

interesting :) i have to find more time to take a look at this more closely because i didn't noticed that :P but is there a official or recommended way to achieve the same without vsync? the topic of having better control over how much resources are pulled from the system interests me has it saves the hardware without loosing performance or choose to loose performance to keep an app running with controlled temperature on a harsh environment. (ex: if i have to leave my house and let my computer running compiling a huge program and there is the risk of overheat, to avoid the bios shutting the computer down resulting in a corrupted work what i do in linux is use the governor to block the cpu frequency on lets say half the cpu performance) that way i loose performance but it wont overheat for sure and eventually the work is done, but the same is not so simple with gpus and also would be better if the apps had support for such feature.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: 50% CPU during Demo app

Post by hybrid »

Limitiv the app via vsync is quite a common way and comes without any decrease in quality for fast systems. For slow ones, this means that the frame rate might drop more than necessary, though. Other ways would be to call sleep or yield after rendering. This will give the unused ressources to other apps, but only if they are required (for yield) or even if there are no ressources in your app left (for sleep). You need to figure out on your own how much CPU time you need and call those methods accordingly. There's no good for all in this case.
Post Reply