-
-
Notifications
You must be signed in to change notification settings - Fork 23.4k
Add a FPS limit applied when the project window is unfocused or minimized #47812
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
base: master
Are you sure you want to change the base?
Conversation
9f15d2f
to
8040c46
Compare
I would like this feature 👍 Has it been discussed off-github? |
8040c46
to
f07b6b3
Compare
Not that I know of.
The PR is lacking a review 🙂 The proposal itself seems to have reached consensus (with 18 👍 reactions as of writing and no comments opposing it). |
The problem with this is that if you are profiling, the window it will break the profiler. This would need to be disabled by the editor or via debugger protocol. |
Maybe I could add an Edit: Done 🙂 |
…ized This helps decrease power usage while the project window is unfocused or minimized. The default FPS limit is 10. It can be disabled by setting the `application/run/max_fps_when_unfocused` project setting to 0. The FPS limit is disabled by default when running the project from the editor to avoid interfering with profiling tools.
f07b6b3
to
3bef215
Compare
We discussed this in a PR review meeting and were not fully convinced yet by the approach. It feels like this adds something that can indeed be useful but this might require more thinking to make sure it works well and matches users' expectations (also to be assessed together with the existing low CPU mode option). |
2 years have passed. Has something changed that would make this PR more robust with the profiler? |
This PR no longer affects the running project if it's being run from an editor build, so the profiling issue should be resolved for the local profiling scenario now. However, remote profiling deploys a debug export template which would have the FPS limit applied. Perhaps we should make it only apply to release export templates instead to avoid this. I think ideally, the editor debugger should signal when the profiler (or visual profiler) starts so the running project disables the unfocused FPS limit (and restore it when all profilers are stopped). |
This helps decrease power usage while the project window is unfocused or minimized.
The default FPS limit is 101. It can be disabled by setting the
application/run/max_fps_when_unfocused
project setting to 0.The FPS limit is disabled by default when running the project from the editor to avoid interfering with profiling tools.
This closes godotengine/godot-proposals#2001 and closes #19741.
This PR can be remade for the
3.x
branch if we reach an agreement on it.Testing project: test_fps_limit.zip
Footnotes
I've decided to go with 10 instead of 20, because 20 doesn't result in sufficient power savings on low-end machines that already struggle with rendering projects at 30-40 FPS. ↩