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

Android DJI-Mobile-SDK is hogging CPU #25

Open
ankitcreativearora opened this issue Feb 20, 2018 · 0 comments
Open

Android DJI-Mobile-SDK is hogging CPU #25

ankitcreativearora opened this issue Feb 20, 2018 · 0 comments

Comments

@ankitcreativearora
Copy link

Is this issue about bugs or crash issues of the Sample Code?

Yes

Hi, I am using the DJI OSMO+ gimbal for developing an Android Camera application and I noticed that there is a huge difference in CPU usage when using the official DJI Go app (CPU Usage ~10% to 15%) from the Android PlayStore vs. DJI FPV Demo app (CPU Usage ~40% to 50%). Here are some details re my development environment:

  1. Which DJI Product you are using? - DJI OSMO+
  2. Which DJI SDK you are using? - DJI Android Mobile SDK V4.4.1
  3. Which Android Device and Android System version you are using? - Device: Pixel XL; Android System: 7.1.2 (Android N)
  4. Which Android Studio version you are using? - Android Studio: 3.0.1; JRE: 1.8
  5. A short description of your problem includes debugging logs or screenshots. - I noticed that there is a huge difference in CPU usage when using the official DJI Go app (CPU Usage ~10% to 15%) from the Android PlayStore vs. DJI FPV Demo app (CPU Usage ~40% to 50%). I used the "adb shell top" command to profile CPU usage.

DJI FPV Demo:
6044 u0_a125 16 -4 51% S 151 1597524K 154936K ta com.dji.FPVDemo
6044 u0_a125 16 -4 40% S 154 1601524K 156208K ta com.dji.FPVDemo
6044 u0_a125 16 -4 43% S 157 1604996K 155932K ta com.dji.FPVDemo
6044 u0_a125 16 -4 43% S 159 1607068K 155640K ta com.dji.FPVDemo
6044 u0_a125 16 -4 49% R 163 1611676K 156136K ta com.dji.FPVDemo
6044 u0_a125 16 -4 44% S 166 1614516K 155000K ta com.dji.FPVDemo
6044 u0_a125 16 -4 43% S 167 1616440K 156840K ta com.dji.FPVDemo
6044 u0_a125 16 -4 40% S 170 1619948K 156568K ta com.dji.FPVDemo
6044 u0_a125 16 -4 43% S 173 1623292K 156680K ta com.dji.FPV

DemoDJI Go:
4009 u0_a158 16 -4 13% S 139 2261940K 223852K ta dji.pilot
4009 u0_a158 16 -4 13% S 136 2258952K 226304K ta dji.pilot
4009 u0_a158 16 -4 14% S 131 2253212K 227052K ta dji.pilot
4009 u0_a158 16 -4 14% S 130 2252356K 226992K ta dji.pilot
4009 u0_a158 16 -4 13% S 131 2253640K 223644K ta dji.pilot
4009 u0_a158 16 -4 14% S 128 2250664K 225868K ta dji.pilot
4009 u0_a158 16 -4 13% S 129 2251020K 226740K ta dji.pilot

Note that CPU usage stays ~30% even on the ConnectionActivity (i.e. before even starting the video decoding in the MainActivity). Seems like a whole lot of junk on my device hogging the CPU for no reason...

Questions: - Does anyone know what could be the reason behind this huge CPU usage difference? - Please advice on how I can reduce the CPU usage when using the DJI FPV Demo app; kindly share code snippet or update Github with sample code.

Thanks!

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

No branches or pull requests

1 participant