We left both builds of Zé Chat untouched on the inbox, measured wakeups, CPU, memory and mAh, and wrote down where PAM Native still comes out behind.
The number we least expected was the background one.
When a chat app leaves the screen, you assume it goes quiet. Our React Native build of Zé Chat kept using 5.26% CPU in the background on a Galaxy S10. The PAM Native build of the same app used 0.11% .
On screen, with the inbox open and nobody touching the phone, the gap looked the same. The RN build woke the CPU 3,543 times per minute , roughly 59 times a second, for a screen where nothing changed. The PAM build woke it 130 times per minute , about 2 a second.
This post is only about that state: an app open or backgrounded, doing nothing. We cover how we measured, where the idle cost comes from in our RN build, why PAM has less to do at rest, and the cases where PAM loses.
The setup
We built Zé Chat twice: once on React Native, once on PAM Native.…