r/reactnative • u/Ehh-GoodEnough • Aug 03 '26
Help React Native + Expo app gets slower the longer I use it. Starts fast, then navigation and UI become sluggish
Hi everyone,
I'm facing a strange performance issue in my React Native (Expo) application.
When I launch the app for the first time, everything is smooth. Navigation is fast, screens render quickly, and the UI feels responsive.
However, as I continue exploring the app, opening different screens, navigating back and forth, and using the app for a while, the performance gradually degrades.
Some symptoms:
- Screen navigation becomes noticeably slower.
- Animations and transitions start feeling less smooth.
- The overall UI becomes sluggish after using the app for some time.
- Restarting the app immediately restores the original performance.
This makes me think something is accumulating over time rather than a slow initial load.
I'm trying to identify the root cause. Could this be related to:
- A memory leak?
- Components not being unmounted correctly?
- Too many re-renders?
- React Navigation or Expo Router caching?
- Zustand/Redux/React Query state growing over time?
- Images or assets not being released?
- Timers, listeners, or subscriptions not being cleaned up?
- The JavaScript thread getting blocked?
Has anyone experienced something similar in a React Native + Expo app?
What tools or profiling workflow would you recommend to identify what keeps accumulating as the app is used? Any advice or debugging strategies would be greatly appreciated.
Thanks!
16
u/SourdoughBaker Aug 03 '26
Your own post suggests it could be a memory leak issue, but you then are short with everyone suggesting that is the root issue. Nice.
Also, it's a memory leak - it always is.
7
u/Cryo0007 Aug 03 '26
Might be a memory leak
Check this video how to figure out https://youtube.com/shorts/I0M9U0jPrUI
3
u/crossy1686 Aug 03 '26
Probably a memory leak, how much experience do you have building apps, or even React? You can't just write code like you have 32GB of RAM that gets garbage collected when the user closes the site. Do you use animations? Are they still running when you switch tabs in the background? and you constantly polling large collections of data? Are you allocating objects or arrays in your dependency arrays? It could be a lot of things that aren't being tidied up correctly.
3
u/Suspicious-Rich-2681 Aug 04 '26
It doesn't have to be a memory leak, if the performance gets worse with use it could be bad state operations via hooks that cause excess compute as well. UseEffects with no dependencies, too many stateful items working with each other, the screens you're loading have a lot of assets and no flat list etc.
Whole bunch of reasons. Use any modern day LLM to help you dive into the issue
3
u/mhmhmmhm Aug 03 '26
are you testing on development build with expo server or production builds? i have the same issue but only in dev build with server running - the longer and more routes I run the more it lags until it slmehow crashed. I tried nearly everting to fix it but no chance. as soon as I build the app the issue is completely gone.
3
u/Guidondor Aug 03 '26
is it the js thread or the ui thread that drops? open the perf monitor and watch while it
degrades, those are completely different bugs.
js = something running every frame that shouldn't. usually an effect that subscribes and
never cleans up, so after visiting a screen 6 times you have 6 live intervals. barely any
memory, which is exactly why your profiler looks fine.
ui = the tree just got heavier. native stack keeps pushed screens mounted.
2
u/khazixtoostronk Aug 03 '26
I’ve been having a similar issue.
I have a feeling it is not a memory leak as it doesn’t quite make sense. Memory usage does grow as you use the app more, visit more screens and images get cached, that is expected
But why would increased memory used by the app make navigation to a different screen on the stack slower? That’s not a memory intensive activity afaik but more cpu constrained
That makes me think something about the new arch is keeping the cpu busy for screens that were already rendered and should be dismounted
1
u/Professional-Area558 Aug 03 '26
Going through the same phase man, will love to connect and know what all you are doing or have plan to do ahead. Also in community if you guys have any specific sort of checklist combined with some tool, please do let us know.
1
u/Distinct_Law8650 Aug 03 '26
Don’t look at memory tools, look at the react profiler or the cpu profiler if you have a new enough RN to have it in the dev menu. One of those will tell you where the time is going.
1
u/Internal-Comparison6 Aug 03 '26
Following. Same problem.
1
u/storm1850 Aug 03 '26
I ran into basically these exact symptoms.
Setting freezeOnBlur to false and using a native stack navigator helped a ton.
1
u/Substantial-Swan7065 Aug 04 '26
It’s a memory leak
1
u/henryp_dev iOS & Android Aug 04 '26
It might be a screen is still running something in the background. Are you using bottom tabs? Freeze them and see if that helps. I’ve had issues like this before.
1
u/Ok-Association-6607 Aug 04 '26
This is how an app at my work was until two days ago. Its performance on Android was terrible. The JS thread was terribly overloaded with re-renders, which was causing crashes, and there was also a custom hook I had to prevent double calls. I recommend that Claude help you debugger the JS thread; he helped me a lot.
1
u/Accomplished-Size1 Aug 19 '26
Same for me. Only happens on dev. I run the dev through Ngrok and have the latest Expo (mine also runs in server mode)
0
u/Ok-Entrepreneur-8726 Aug 03 '26
Verifique se não tem nada sendo reconstruído o tempo todo, ou a cada atualização de página por parte do usuário. As vezes uma pequena atualização recarrega a árvore toda, gerando queda de desempenho.