Android性能优化典范——总纲

来源:互联网 发布:淘宝 小石头 编辑:程序博客网 时间:2024/04/29 17:39

Google已经发布了关于Android性能优化典范的六篇专题,这些专题旨在帮助开发者创建更快更优秀的Android App。其中第一篇发布于2015年伊始, 一共16个短视频,每个3-5分钟。课程专题不仅仅介绍了Android系统中有关性能问题的底层工作原理,同时也介绍了如何通过工具来找出性能问题以及提升性能的建议。主要从三个 方面展开,Android的渲染机制,内存与GC,电量优化。第二篇一共20个短视频,包括的内容大致有:电量优化,网络优化,Wear上如何做优化,使用对象池来提高效率,LRU Cache,Bitmap的缩放,缓存,重用,PNG压缩,自定义View的性能,提升设置alpha之后View的渲染性能,以及Lint,StictMode等等工具的使用技巧。第三篇共包含12个短视频,包括的内容大致有:更高效的ArrayMap容器,使用Android系统提供的特殊容器来避免自动装箱,避免使用枚举类型,注意onLowMemory与onTrimMemory的回调,避免内存泄漏,高效的位置更新操作,重复layout操作的性能影响,以及使用Batching,Prefetching优化网络请求,压缩传输数据等等使用技巧。第四篇共包含17个段视频,包含的内容大致有:优化网络请求的行为,优化安装包的资源文件,优化数据传输的效率,性能优化的几大基础原理等等,第五篇共包含10个视频,涉及的内容有:多线程并发的性能问题,介绍了 AsyncTask、HandlerThread、IntentService 与 ThreadPool 分别适合的使用场景以及各自的使用注意事项。这是一篇了解 Android 多线程编程不可多得的基础文章,清楚地了解这些 Android 系统提供的多线程基础组件之间的差异以及优缺点,才能够在项目实战中做出最恰当的选择。第六篇共包含 6 个视频,涉及的内容主要有程序启动时间性能优化的三个方面:优化 activity 的创建过程,优化 Application 对象的启动过程,正确使用启动显屏达到优化程序启动性能的目的。另外还介绍了减少安装包大小的 checklist 以及如何使用 VectorDrawable 来减少安装包的大小下面按顺序依次列出,后面的文章会针对其中的每一种进行深入分析。

  1. Render Performance
  2. Understanding Overdraw
  3. Understanding VSYNC
  4. Tool:Profile GPU Rendering
  5. Why 60fps?
  6. Android, UI and the GPU
  7. Invalidations, Layouts, and Performance
  8. Overdraw, Cliprect, QuickReject
  9. Memory Churn and performance
  10. Garbage Collection in Android
  11. Performance Cost of Memory Leaks
  12. Memory Performance
  13. Tool - Memory Monitor
  14. Battery Performance
  15. Understanding Battery Drain on Android
  16. Battery Drain and WakeLocks

  17. Battery Drain and Networking

  18. Wear & Sensors
  19. Smooth Android Wear Animation
  20. Android Wear Data Batching
  21. Object Pools
  22. To Index or Iterate?
  23. The Magic of LRU Cache
  24. Using LINT for Performance Tips
  25. Hidden Cost of Transparency
  26. Avoiding Allocations in onDraw()
  27. Tool: Strict Mode
  28. Custom Views and Performance
  29. Batching Background Work Until Later
  30. Smaller Pixel Formats
  31. Smaller PNG Files
  32. Pre-scaling Bitmaps
  33. Re-using Bitmaps
  34. The Performance Lifecycle
  35. Tools not Rules
  36. Memory Profiling 101

  37. Fun with ArrayMaps

  38. Beware Autoboxing
  39. SparseArray Family Ties
  40. The price of ENUMs
  41. Trimming and Sharing Memory
  42. DO NOT LEAK VIEWS
  43. Location & Battery Drain
  44. Double Layout Taxation
  45. Network Performance 101
  46. Effective Network Batching
  47. Optimizing Network Request Frequencies
  48. Effective Prefetching

  49. Cachematters for networking

  50. Optimizing Network Request Frequencies
  51. Effective Prefetching
  52. Adapting to Latency
  53. Minimizing Asset Payload
  54. Service Performance Patterns
  55. Removing unused code
  56. Removing unused resources
  57. Perf Theory Caching
  58. Perf Theory Approximation近似法
  59. Perf Theory Culling遴选挑选
  60. Perf Theory Threading
  61. Perf Theory Batching
  62. Serialization performance
  63. Smaller Serialized Data
  64. Caching UI data
  65. CPU Frequency Scaling

  66. Threading Performance

  67. Understanding Android Threading
  68. Memory & Threading
  69. Good AsyncTask Hunting
  70. Getting a HandlerThread
  71. Swimming in Threadpools
  72. The Zen of IntentService
  73. Threading and Loaders
  74. The Importance of Thread Priority
  75. Profile GPU Rendering : M Update

  76. App Launch time 101

  77. App Launch Time & Activity Creation
  78. App Launch Time & Bloated Application Objects
  79. App Launch Time & Theme Launch Screens
  80. Smaller APKs: A Checklist
  81. VectorDrawable for smaller APKs
1 0