taichi-aot-demo
taichi-aot-demo copied to clipboard
Tune android system resource scheduler for performance measurement
While we developed Android AOT demo for v1.0 release we noticed an interesting (or confusing) behavior in our demo app. It runs super fast upon startup, and then slows down possibly due to Android "smart" resource management marking it as a non resource-intensive application and somehow limit how much resource is allocated to our app. A "simple" proof of concept we found is that the app runs dramatically faster if we swipe up from bottom of the screen to force entering the overview mode.
To demonstrate the speed difference described above, we run the app on a Redmi K40 where the speed gap is more visible. Please see the gifs listed below, notice the fps stabilized at 20fps at startup (the first gif) and jumped to 50fps and stabilized at 30fps in the end (the second).
Any insights or ideas about how to fix the speed gap are highly appreciated! cc: @k-ye @turbo0628 @bobcao3
-- Team Android (v1.0 limited edition), Taichi Graphics
Try measure the cpu/gpu frequency and cpu temperature with tools (e.g PefDlog ), some kind of Android devices will automatically lower the cpu frequency when cpu temperature exceeds certain threshold to reduce energy consumption (or meet other specific conditions), and recover it while there is user interaction,
you can simulate user interaction using adb command tap frequently to see if the cpu frequency recovered
adb shell input tap 200 200
The energy saving strategy of Android devices may complicated depends on different manufacturers, some manufacturers will provide white list to apps, see Hardcoder
is there debug environment to Recurrence this problem?
@keith2018 I've tried tapping but it didn't help hmmm. Gonna give pefdlog a try and see if there's anything suspicious. @eatcosmos hmmm nope it also happens in the release build of the app :(
@keith2018 I've tried tapping but it didn't help hmmm. Gonna give pefdlog a try and see if there's anything suspicious. @eatcosmos hmmm nope it also happens in the release build of the app :(
hi how can i get the same images phenomenon above, in real phone or emulator?

@eatcosmos Yea you can download the app from https://github.com/taichi-dev/taichi/releases/download/v1.0.0/TaichiAOT.apk and installing it on a android10+ can reproduce this issue!