developer_quest icon indicating copy to clipboard operation
developer_quest copied to clipboard

Set sustained performance mode

Open filiph opened this issue 5 years ago • 6 comments

This makes the app run fast even when not being touched. We should have this for the demo at I/O. On the other hand, the released app should not have this.

More about sustained performance mode, from Android N release notes:

Performance can fluctuate dramatically for long-running apps, because the system throttles system-on-chip engines as device components reach their temperature limits. This fluctuation presents a moving target for app developers creating high-performance, long-running apps.

https://developer.android.com/about/versions/nougat/android-7.0.html#sustained_performance_api

Alternatively, we can later have this in settings. But that requires building a plugin / calling to Kotlin, which is work we haven’t bargained for.

Note that this does not fully prevent Android from throttling CPU according to load. In other words, this is not sufficient for performance testing. This is only to make sure a demo device in demo mode runs at optimal speed even when it hasn’t been touched by any user for a long time.

cc @efortuna for visibility

filiph avatar Apr 17 '19 18:04 filiph

If we create two branches: one for the I/O sandbox devices (via internal testing / TestFlight), and second one for production release to user devices, this PR should be only merged to the former and not the latter.

filiph avatar Apr 18 '19 22:04 filiph

So the I/O sandbox devices would be installed from a beta track in Play? Or could there be a hidden setting in the app that we can activate on the sandbox installs?

mjohnsullivan avatar Apr 23 '19 20:04 mjohnsullivan

Either way is fine. Having a setting is a little more work imho (it requires us to deal with platform channels).

filiph avatar Apr 23 '19 20:04 filiph

Should we resubmit this to the demo branch?

luigi-rosso avatar May 04 '19 02:05 luigi-rosso

Tagging @filiph

efortuna avatar May 04 '19 14:05 efortuna

Sorry for not seeing this earlier. I rebased to demo branch. I'm guessing it's too late for I/O, unless that line made it to that code some other way.

filiph avatar May 08 '19 18:05 filiph