developer_quest
developer_quest copied to clipboard
Set sustained performance mode
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
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.
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?
Either way is fine. Having a setting is a little more work imho (it requires us to deal with platform channels).
Should we resubmit this to the demo
branch?
Tagging @filiph
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.