CodeFest 2019. Дмитрий Виноградов (Axel Springer) — Android. Производительность в Android-приложениях

16b6c87229eaf58768d25ed7b2bbbf52?s=47 CodeFest
April 06, 2019

CodeFest 2019. Дмитрий Виноградов (Axel Springer) — Android. Производительность в Android-приложениях

Я расскажу об инструментах, которые помогут вам повысить производительность ваших Android-приложений. Поговорим о памяти, CPU, сетевых запросах, энергопотреблении, размере APK и скорости UI.

16b6c87229eaf58768d25ed7b2bbbf52?s=128

CodeFest

April 06, 2019
Tweet

Transcript

  1. 2.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  2. 3.

    Performance is important • Happy User • Google Play Reviews

    • Google Play Search and Recommendation
  3. 5.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  4. 7.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  5. 8.
  6. 12.
  7. 13.
  8. 14.

    Recording Configurations 1. Sample Java Methods 2. Trace Java Methods

    3. Sample C/C++ Functions 4. Trace System Calls
  9. 19.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  10. 24.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  11. 25.
  12. 26.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  13. 27.
  14. 28.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  15. 32.
  16. 33.
  17. 34.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  18. 35.
  19. 37.
  20. 38.

    • Performance • Android Studio Profiler • CPU • Memory

    • Network • Energy • GPU • APK Analyzer • Tips
  21. 39.

    UI • Flat view heirarchy • ViewStub • <include>, <merge>

    • DiffUtil, notifyItem* • Avoid excess backgrounds
  22. 40.

    Memory • Avoid creating unnecessary objects (iteration, onDraw, onBindViewHolder) •

    Avoid memory leaks • SparseArray • ComponentCallbacks2
  23. 41.

    Network and Energy • Push (FCM) • Cache • Different

    picture quality or resolution • WebP or compressed PNG and JPEG • WiFi and Charger if can wait • Network batching
  24. 42.

    APK size • Remove unused code (minifyEnabled) and resources (shrinkResources)

    • Vector graphic and nine-patch • Multiple APKs or App Bundle