Context
The ed-tech company's white-label React Native app is used on Android and iOS during lessons. I investigated and fixed a set of heating, battery and memory problems in October 2026.
The problem
Users reported that phones got hot and drained during lessons. There was no measurement in place, so each report was a guess.
What I did
I built a perf harness first, so each fix could be compared before and after, and added a native resource monitor that reports battery, CPU and memory to Sentry.
With Perfetto I found an Android layout loop that kept the CPU busy while the app was in the background. I fixed it.
I found a dispatch loop running at 4 Hz and fixed that too.
On iOS, a looping animation on the chat button caused a background CPU kill. I removed the loop.
I also traced Redux memory growth and a native memory leak that grew 4 to 7 MB a minute.
Key decision
I built the measurement harness before any fix. It cost days before the first change, but it let me say which of several suspects actually mattered.
It also stopped me from trusting a fix that only felt faster.
Result
Android background CPU dropped from 133% to about 20%. Battery drain fell by 69%, from 138 to 43 mAh over 21 minutes.
The native memory leak was flattened. Before it, the app would run out of memory in about 2 hours.
What I learned
I would use the harness approach again. What I still lack is crash-free users before and after the work, and I want to add that.
Stack
- React Native
- Perfetto
- Sentry
- Kotlin
- Redux
