How Discord Achieves Native iOS Performance with React Native
Article Summary
Discord runs millions of MAU on iOS with just 3 core engineers. Their secret? React Native—but only after a brutal performance overhaul.
When Discord's iOS app became nearly unusable on iPhone 6s despite once running smoothly on iPhone 5s, they formed a mobile performance squad. This deep-dive chronicles their systematic hunt through Flux stores, React components, main thread bottlenecks, gestures, and bundle loading.
Key Takeaways
- Cut message parsing from 1000ms to 90ms by fixing regex compilation in JSC
- Replaced FlatList with custom FastList, saving 70-90ms render time
- Fixed UIImage loading bug that caused 50ms delays per image load
- RAM bundles and lazy loading dropped TTI by 3500ms on iPhone 6
- Rewrote navigation drawers with react-native-reanimated for buttery smooth gestures
Critical Insight
Through five optimization phases, Discord achieved consistent 60 FPS, slashed battery drain, and cut initial load time by over 2 seconds while maintaining their React Native foundation.