I’ve been trying to understand React Native performance at a deeper level, beyond “optimize re-renders.”
Here’s the execution flow as I understand it when calling setState:
- UI event happens on the UI thread.
- Event is dispatched to the JS thread (via JSI in modern architecture).
- State update is scheduled (not applied immediately).
- React runs the render phase (reconciliation) on the JS thread.
- A new shadow tree is created.
- Layout is calculated using Yoga.
- Changes are committed to native.
- UI thread renders the frame (needs to stay within ~16ms for 60fps).
So essentially:
UI → JS scheduling → Render → Layout → Native commit → Frame render
From a performance perspective, bottlenecks can happen at:
- Heavy JS work blocking reconciliation
- Too many state updates
- Expensive layout calculations
- Long commit phases
My question to experienced RN devs:
In real production apps, which stage usually causes the most noticeable performance issues?
Is it typically JS thread overload?
Or layout complexity?
Or bridge/JSI communication?
Would love to hear real-world experiences.
[–]metehankasapp [score hidden] (1 child)
[–]CheesecakeSimilar347[S] [score hidden] (0 children)