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

Initial work on supporting sustained perf mode #9901

Merged
merged 3 commits into from
Aug 16, 2017

Conversation

hrydgard
Copy link
Owner

Fixes #9738.

Sustained performance mode is intended for keeping clock frequency down to be able to run for a long time without overheating. Enabling this on a device makes it a good optimization target and will of course also last longer, but will also run slower.

Anyway, I'm surprised that my Nexus 5X with Android O Beta on it returns false when I ask isSustainedPerformanceModeSupported() , so can't use it on that, strangely. You'd think that it would be supported on the very latest Android...

@hrydgard hrydgard added this to the v1.5.0 milestone Aug 15, 2017
@brujo5
Copy link

brujo5 commented Aug 16, 2017

@JonnyH

Copy link
Collaborator

@unknownbrackets unknownbrackets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can test tomorrow on my Pixel.

It looks like this is missing the change to std::string NativeQueryConfig(std::string query) {, though?

-[Unknown]

if (Build.VERSION.SDK_INT >= 24) {
if (powerManager.isSustainedPerformanceModeSupported()) {
sustainedPerfSupported = true;
NativeApp.sendMessage("sustained_perf_supported","1");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ", ". We may have lost the war on consistent indenting, but...

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) Done.

@hrydgard
Copy link
Owner Author

Thanks, fixed NativeQueryConfig.

@unknownbrackets
Copy link
Collaborator

Seems to work fine. It's slower but seems more stable - that said, it's also slower than running the game without it for > 60 seconds, at least for me.

-[Unknown]

@unknownbrackets unknownbrackets merged commit cd43049 into master Aug 16, 2017
@hrydgard
Copy link
Owner Author

Good to know, thanks for testing! Maybe it will be useful for some.

@hrydgard hrydgard deleted the sustained-perf-mode branch August 16, 2017 19:26
@unknownbrackets
Copy link
Collaborator

Right - I should've clarified: I mostly got full speed either way. There were dips both with it on and off, but the dips were worse with sustained on. Fast forward confirmed a difference in max speed/clock.

Probably should've tried more games. I suspect that games that consistently run full speed will probably use less battery and might have more even performance. Wasn't meaning to say it didn't seem like a good feature to me.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants