Pinterest Lin Wang Apr 8, 2026

Performance for Everyone

Article Summary

Lin Wang from Pinterest's Android Performance team just solved a problem that costs most teams two engineer-weeks per feature: measuring user-perceived latency. Their solution? Make it completely automatic.

Pinterest's performance team built an ingenious system that automatically measures 'Visually Complete' (when users actually see content) across all app surfaces. Previously, engineers had to manually implement custom measurement logic for each feature, creating a major barrier to performance work.

Key Takeaways

Critical Insight

By baking performance measurement into base UI classes, Pinterest democratized performance monitoring and now tracks user-perceived latency across 60+ surfaces with zero manual effort per feature.

The article reveals two unexpected benefits that emerged once performance metrics became free for everyone, including how they now handle short-lived seasonal features.

About This Article

Problem

What counts as 'Visually Complete' changes depending on where you are in Pinterest. On Video Pin Closeup, it means the full-screen video has loaded. On Home Feed, all images need to be rendered. On Search, you're waiting for autocomplete text and avatars. Because these definitions are so different, engineers had to write custom measurement logic for each surface.

Solution

Lin Wang's team created common media view interfaces called PerfImageView, PerfTextView, and PerfVideoView. Each one has methods to track rendering status. They then built traversal logic into BaseSurface that walks through the view tree and detects when all visible media elements have been drawn or have started playing.

Impact

The system now tracks user-perceived latency across 60+ surfaces at the same time. Product teams can compare performance fairly across different features. They can also measure short-lived features like seasonal landing pages without needing engineers to set things up beforehand.