In 2017 the Pinterest web platform and growth teams, teamed up to rebuild the pintrest mobile web from scratch.
Over Three month period, a new progressive web app was built and shipped with some fairly incredible results
Pinterest have 100+ web engineers, committing to the code base, So it was important the new experience stayed fast over time. The solution is performance budgets, Three main steps;
Focused on core bundles, alerting if a large import bump is detected. This could be caused by a single import.
A single import could add hundreds of kilobytes to the bundle, to prevent this a custom eslint plugin was written to prevent imports from specific paths. For example on the mobile-only codebase should not be allowed to import from the desktop only codebase.
Composite metric lets you define a higher level metric specific to your app, this is frequently measuring what your users care about. At Pinterest, a new metric named Pinner Wait Time (PWT) was created - Pinterest users come to see images, PWT metric tracks the time to interactive + Above the fold image load times. This was used in combination with time to first paint, and time to interactive. These essential for debugging performance regression.
Pinterest runs hundreds of experiments and A/B tests at any one time, so performance regression data was added to the optimise dashboard. This increased visibility and kept engineers aware of performance impact caused by experiments.
Year on year worldwide +103% increase on weekly users, and +300% increase in session length. And the mobile website has become the number one platform for new user signups (surpassing desktop, and native apps).
Continued growth, particularly in emerging markets where bandwidth is limited and low-end devices, are common. In such low bandwidth areas, weekly users had increased by 300% and the number of pins had increased by over 600% - The number of pins Pinterest sees is directly correlated with overall revenue,