-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background / sleep mode (to stop CPU hugging) #29257
Comments
Hey! Thanks for your report. A couple of things:
Depending on how often and long that happens and how small or large your project is, I wouldn't dismiss this as not a bug that fast. Even on my older laptops I haven't noticed anything close to this. So can we get more information about your projects, their size, what features you use, and your hardware and OS, and the Godot version you use? Do you use Mono/C#? The other thing is that there is a low processor usage mode already. Do you have that enabled, and if so, does it help? |
Another thing:
How long does it take to open the Godot editor and your project, on average, if you had to give an estimate? |
@mhilbrunner The low-processor usage mode is enabled by default in the editor, unless you click the update spinner in the top-right corner and set the update mode to Update Always (which is now considered deprecated). There are several things that can cause high CPU/GPU usage when using the editor:
|
@Calinou Do we do this if the window is minimized? |
@mhilbrunner It looks like CPU usage isn't decreasing much if I minimize the editor while having visible emitting particles (tested on Linux). This could probably be fixed by decreasing the FPS cap while the editor is minimized, but I'm not seeing any related signals in the |
This decreases CPU/GPU usage when the window is unfocused, which can be beneficial to laptop users. This also makes the low-processor mode sleep project setting no longer affect the editor. Instead, two new editor settings now define the duration of sleeping when the editor is focused and unfocused. This closes godotengine#24209 and partially addresses godotengine#29257.
I believe this is fixed by #29297, so I'll close this. If you need further power savings, you can increase Low Processor Mode Sleep Usec and Unfocused Low Processor Mode Sleep Usec in the Editor Settings (both values are in microseconds). |
This decreases CPU/GPU usage when the window is unfocused, which can be beneficial to laptop users. This also makes the low-processor mode sleep project setting no longer affect the editor. Instead, two new editor settings now define the duration of sleeping when the editor is focused and unfocused. This closes godotengine#24209 and partially addresses godotengine#29257.
It has nothing to do with any particular version, code or OS.
I noticed that it happens all the time for no particular reason at all that Godot is very generously consuming 20%, 50%, or sometimes 80%+ CPU while essentially idling. The program isn't crashed or hung when that is the case, you can use it normally. It isn't a bug that this happens, its understandable, and by itself needs no fixing.
Regardless to me its a huge deal, because I only casually develop games. I leave the program open in the background and then only do 15 minutes here and there throughout the day while watching TV or cleaning my house or whatever.
So 95% of the time the program is idling and driving my notebook fan to high noise plus I suspect my power bill up by 5-10 Euros a month (I live in Germany ... its that expensive here).
If you are developing on a professional level, you start the program, work on your project and then you just close it the end of the day. No issue at all.
But with casual development in your kitchen or on the couch, its not like that. Either the fan noise or the slowdown (or even just fear of possible slowdown) or environmental concern will force you to like open and close the program 20 times a day, as to just use it when needed. This is very unproductive and its so off-putting to start the program that you maybe don't start it at all anymore a lot of times.
I propose a feature to enable "sleep mode". So you could check the feature in the options to kick in like after 5 minutes if the Godot window is not active. This would entirely cure the issue for casual home developers.
The text was updated successfully, but these errors were encountered: