Skip to content
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

Default update_vital_only to true for Android and Web editor #72958

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

lawnjelly
Copy link
Member

@lawnjelly lawnjelly commented Feb 9, 2023

Android devices will typically be powered from battery. This PR defaults the editor on Android to use update_vital_only mode, using as little power as possible, in order to conserve battery.

Also shows the update spinner by default, to emphasize that vital updates only is occurring, and allow easy switching out of the mode.

Notes

  • Now that the editor is downloadable from google play and a lot more people may be using it on Android, it does make some sense to default the editor in modes that use the least power possible, so that Godot does not drain the battery excessively.
  • Vital updates was introduced in Add editor vital redraws only option #53463 , see that PR for more details.
  • It significantly reduces CPU use (often by about 10x).
    (The other CPU hog is audio thread, which [3.x] Add ability to mute AudioServer. #63458 is designed to deal with, and reduces CPU use by a further approx 5x).
  • The main trade off here is that in vital_updates_only mode, the cursor does not flash.
  • I've also shown the update spinner by default. This makes it easier to switch in and out of vital_updates_only mode, and more apparent that there are update options, which are particularly relevant on mobile.

Deciding whether to default in this mode has pros and cons, so I will leave it up to reviewers to decide whether this is the best action.

editor/editor_node.cpp Outdated Show resolved Hide resolved
@lawnjelly lawnjelly force-pushed the android_update_vital_only branch from d80eff6 to 274d8d6 Compare February 9, 2023 12:00
@akien-mga akien-mga changed the title Default update_vital_only to true for Android editor Default update_vital_only to true for Android and Web editor Feb 9, 2023
editor/editor_node.cpp Outdated Show resolved Hide resolved
Android devices will typically be powered from battery. This PR defaults the editor on Android to use `update_vital_only` mode, using as little power as possible, in order to conserve battery.
Also shows the update spinner by default, to emphasize that vital updates only is occurring, and allow easy switching out of the mode.
@lawnjelly lawnjelly force-pushed the android_update_vital_only branch from 274d8d6 to 0876a16 Compare February 9, 2023 17:58
@akien-mga akien-mga merged commit 77bac13 into godotengine:3.x Feb 13, 2023
@akien-mga
Copy link
Member

Thanks!

@lawnjelly lawnjelly deleted the android_update_vital_only branch February 13, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants