Pinterest Arla Rosenzweig & Lin Wang Aug 9, 2022

Four Lessons in Making Pinterest Faster on Android

Article Summary

Pinterest was bleeding user engagement on Android. With 75% of signups coming from outside the U.S. and 90% of global smartphones running Android, they had to fix their performance problem fast.

The Pinterest Android team tackled their speed crisis head-on, implementing systematic performance monitoring and optimization. They focused on what matters most: reducing the time users wait between tapping and seeing content.

Key Takeaways

Critical Insight

By preventing regressions and optimizing data parsing, Pinterest proved that every 100ms saved directly increases user engagement.

The team discovered an unexpected functional regression that passed QA testing but was caught by their performance monitoring system.

About This Article

Problem

Pinterest's Android app was slow to start because Gson's reflective type adapters were eating up resources during cold launches. New users had to wait longer to see content.

Solution

Pinterest Engineering switched to generating Gson type adapters at compile time instead of runtime. This removed the expensive reflection calls and made JSON parsing much faster.

Impact

The change cut about 30 milliseconds off the app's cold start time. That means Pinners see content faster when they open the app for the first time.