React Native Blog Aug 7, 2017

React Native Performance In Marketplace

Article Summary

Facebook cut React Native Time to Interaction in half on low-end Android devices. The secret? They stopped trusting their testing tools and went straight to production data.

Facebook's engineering teams collaborated to dramatically improve Marketplace performance in 2017. They discovered that traditional profiling tools like Systrace and CTScan were wildly inaccurate for production scenarios, sometimes off by thousands of milliseconds. So they built a meticulous production instrumentation system based on millions of real user samples.

Key Takeaways

Critical Insight

Facebook halved Marketplace TTI on low-end Android devices by ditching synthetic benchmarks for production instrumentation and systematically eliminating thread contention.

The article reveals exactly which common React Native assumptions turned out to be completely wrong when tested against real production data.

About This Article

Problem

Facebook's Marketplace team found that threads jumping to busy threads created expensive blockages when React Native started up. Their initial instrumentation didn't catch these stalls across millions of production samples.

Solution

The team removed AsyncTask dependencies and stopped forcing ReactContext initialization on the UI thread. They also eliminated ReactRootView measurement at startup to reduce thread contention.

Impact

These fixes cut Marketplace startup time by over 25%. It shows that changes to React Native's architecture can improve performance in ways that JavaScript optimization alone cannot.