Lowering cpu load
-
supperpiccle
- Posts: 3
- Joined: Sat Jan 25, 2014 12:18 am
Lowering cpu load
I am running the first example in irrlicht and noticed on my quad core it uses the equvilent of a whole core(some on each core) i am using ubuntu 13.10 and was wondering if there was any way to lower the cpu load. I just think for a small app it is rediculous to use that much(i have intel core i5 4670k should rape the first example no sweat)
Re: Lowering cpu load
May be use the sleep function inside the loop.
Re: Lowering cpu load
Use Vsync? Most game player's preference is for high frame rate, which implies that the CPU should not pause.
In any case, you should be able to use two cores with a properly written app. So the example is using only 50% of the expected CPU utilisation!
In any case, you should be able to use two cores with a properly written app. So the example is using only 50% of the expected CPU utilisation!
Re: Lowering cpu load
The first example uses software rendering...
-
randomMesh
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: Lowering cpu load
Use
this code just pauses the processor for a brief amount of time to let it cool down.
Code: Select all
device->yeild()-
supperpiccle
- Posts: 3
- Joined: Sat Jan 25, 2014 12:18 am
Re: Lowering cpu load
i tried using vsync in the createdevice function but didn't change anything...looking up documentation for it it seems as if it is only for fullscreen?
-
supperpiccle
- Posts: 3
- Joined: Sat Jan 25, 2014 12:18 am
Re: Lowering cpu load
Hey i followed the indirect advice of hendu and yes software renderer must use cpu. When i changed to opengl(cause im on linux!:) ) it didn't make the cpu freak out. Thanks for the help!
Re: Lowering cpu load
Also, since your game loop doesn't limit the frame rate in any way, the engine is free to update as fast as possible which can eat all the processing power 