系列文章目录:
- Android性能优化典范综述
- Android性能优化典范之Render Performance
- Android性能优化典范之Understanding Overdraw
- Android性能优化典范之Understanding VSYNC
- Android性能优化典范之Profile GPU Rendering
2015年1月6日,Google官方发布了一系列关于Android性能优化的小视频,将其命名为Android Performance Patterns,这一些列视频放在YouTube上,观看的话需要科学地上网。

现在回看这组视频,需要把“渲染机制”和“工具入口”分开理解。16ms 帧预算、过度绘制、VSYNC、主线程/渲染线程协作这些机制仍然是图形性能的基础;但当年配套使用的 Hierarchy Viewer、TraceView、Android Device Monitor、Google+ 社群已经不是今天的主线。现在应该用 Layout Inspector/Compose Layout Inspector 看 View 或 Compose 层级,用 Profile GPU Rendering 和 Debug GPU Overdraw 做快速可视化,用 Perfetto Frame Timeline/System Trace 看真实帧生命周期、SurfaceFlinger、CPU 调度和 Binder 关系,用 Macrobenchmark FrameTimingMetric 把滑动/页面切换场景固化成可回归测试。
官方简介:
Android Performance Patterns is a collection of videos focused entirely on helping developers write faster, more performant Android Applications. On one side, it’s about peeling back the layers of the Android System, and exposing how things are working under the hood. On the other side, it’s about teaching you how the tools work, and what to look for in order to extract the right perf out of your app.
But at the end of the day, Android Performance Patterns is all giving you the right resources, at the right time to help make the fastest, smoothest, most awesome experience for your users. And that’s the whole point, right?
总之就是一系列讲解Android性能相关的视频。这些小视频的时间非常短,在3-5分钟之内,主讲人的英文语速也非常快,初期这些视频没有翻译的时候,着实考验了一把听力。好消息是现在这些视频已经都有中英文字幕了。
这些视频的时间虽然很短,但是信息量却非常大,有些他一句话带过的内容,我们却需要花费很多的时间去研究他的原理,或者研究一个调试工具如何使用。也就是说,这一系列视频并没有真正教你如何去优化你的应用,而是告诉你关于Android性能优化你需要知道的知识,这样你去优化你的Android应用的时候,知道该用什么工具,该采取什么样的步骤,需要达到什么样的目标。

