I am trying to throttle down the cpu usage of the engine. I am working on a program that does not need to update the state so often, it need to update the state just when the user make some input.
I have trying to make the cpu usage lower by using the following code:
Even with all of that at the same time the cpu usage is maxed in one core. Also tested Thread.Sleep()
Plase note that the code is just a test. I was expecting that at least at 1 FPS, not rendering and disabling some systems the CPU usage would decrease but is not.
Is this a bug?
There is a way to control the update of the engine?
Instead of in code, set low processor mode in project settings.
Then, in your scene, make sure nothing is drawn. It will run at the FPS set on Max FPS in the project settings. This is because it is still checking for input and signals. It should have <10% CPU usage this way. It may be a bug if setting this in code has no effect.
Thanks for your response. I also done it in the project settings and I am sure the project is running at 1 fps. But the cpu usage still at max I will do more in depth profiling using some tool to see all threads that are running.
After profiling the threads I found a thread that I created time before and I forgot about it and that was the reason I was seeing the Cpu Core at max speed. Sorry about the time lost. Thanks!