Page 1 of 1

CPU Usage

Posted: Fri Oct 23, 2009 17:32
by WhiteBishop
Hi CE,

We are currently developing a game for industrial PCs. All PCs are working all day, so when we run the game it takes 100% from the CPU (if we'll have CPUs, or two cores it also will use 100%).

This industrial PCs works at low temperature, but if the aplication demands to the processor in this way, his useful life will be reduced. We tried in Ubuntu 9.4 and in Fedora 11, with Demo6, and it used 100% from the CPU in both cases (using CEGUI 0.7 version).
We dont have big needs about FPS, we think that with 30 FPS it will be just fine for us.

So, we would like to know if its possible to limit the CPU usage. If its not possible, do you know about a workaround, for the aplication, that could reduce the CPU usage on IDLE time?, and one more question; if we dont have anything to draw, could we avoid for the aplication to draw?

Thanks in advance for tour time and assistance.



WB

Re: CPU Usage

Posted: Fri Oct 23, 2009 18:28
by Jamarr
Please read the Forum Guidelines before starting a new thread. Usually your question will have already been asnwered. For example, searching for "cpu usage" turned up this.

The gist is that CEGUI only runs when you tell it too. If you feed it input, it will process that input. If you tell it to render, it will go through the rendering process, etc. In otherwords, if you want to reduce cpu usage then stop giving CEGUI something to do every single frame. A quick solution may be to lock the frame-rate of your application.

Also, demo's are generally not good indicators of resource usage, optimum code paths, efficiency, etc. And the amount of cpu usage does not lie solely in the hands of CEGUI - it is your responsability as the application developer to figure out how much time you need to spend per frame on logic and rendering and balance out cpu usage yourself.