inaturalist/react-native-inat-camera

Change timing of throttling in AR Camera

albullington opened this issue · 1 comments

We've had a number of users complain about battery usage and/or their phone getting too hot while using Seek on Android devices, such as this user:

I like your app, and it's cool to identify nature's beautiful bounty of life. ^^
But, please tune your app! In less than a minute of use, my phone gets hot, and no other app has done this before. My phone is less than a year old, an LG G7+, so it has an almost current generation processor.

In Android, the AR camera does analysis of every frame, then throttles the results before passing them to React Native (i.e. camera -> CV -> throttle -> RN). One side effect of this is that the CV system has to do more work if a user has a newer phone / camera.

We should change this to behave like the iOS AR camera, where throttling happens between the camera and CV analysis (i.e. camera -> throttle -> CV -> RN). Throttling should happen before vision has processed each frame.

(anything to add here @alexshepard?)

I think I am not as confident that this is the actual problem, and I am not as confident in my understanding of how CV throttling is implemented on Android.

Yaron, I'd mainly say that I think we need to investigate battery/thermal performance on the Android RN-inat-camera, with a suggestion that CV throttling is a likely place to check.