An idle chat app on a Galaxy S10: 3,543 CPU wakeups a minute on React Native, 130 on PAM Native

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. Same app, same screens.

  • Device: a real Galaxy S10, not an emulator.
  • Runs: 3 per scenario. Every number below is the median.
  • Date: October 15, 2026.
  • Scenarios: idle on screen, idle in the background, and battery use across 10 idle minutes.

Each figure is a total for its scenario. We did not break wakeups down by source, so we can say how many there were, not exactly which component caused each one.

Results at rest

Scenario PAM Native React Native Difference
Wakeups per minute, idle on screen 130 3,543 27.3x fewer
CPU, idle on screen 0.3% 8.62% 28.7x less
CPU, in the background 0.11% 5.26% 47.8x less
Battery, 10 idle minutes 0.05 mAh 0.66 mAh 13.3x less
Memory at rest 166 MB 444 MB 2.7x less

The background row has the largest ratio of the set: 47.8x.

Where the idle cost comes from in our RN build

A static screen in React Native still has a JavaScript runtime behind it. In our build, the JavaScript engine, the bridge and the timers kept running while the screen was unchanged, and kept running after the app went to the background.

One wakeup costs almost nothing. 59 of them every second is a different story: the CPU rarely gets to stay in a low-power state. Over hours, that becomes battery drain the user never triggered.

This is not a claim that React Native is badly built. It is a design choice: a JavaScript runtime sits between app state and the native platform, and that runtime has its own work to do. Our numbers measure what that layer cost for this app on this phone.

Why PAM has less to do at rest

PAM Native has no JavaScript runtime, no WebView and no DOM. A user action travels this path:

native event → PHP action → reactive state → Rust diff → UI-thread commit 
  • PHP holds component state (#[State]) and actions.
  • Rust validates the UI tree, diffs one screen against the next, and runs layout.
  • Kotlin and Swift apply only the required changes to real Android Views and UIKit controls, on the UI thread.

A minimal component looks like this:

<?php use Pam\Native\Attributes\State; use Pam\Native\Component; final class Counter extends Component { #[State] public int $count = 0; public function increment(): void { $this->count++; } } 

The key point for idle: the pipeline starts from an event. A tap, a gesture or new data kicks it off. An inbox with no input and no new messages gives it nothing to process.

Three other choices point the same way:

  • Gestures (tap, pan, pinch, rotate, swipe, long-press) are recognized on the UI thread.
  • Animations and gestures run without per-frame traffic through PHP.
  • PHP stays loaded. PAM is a persistent runtime written in Rust that keeps the app in memory instead of starting it up and tearing it down for each piece of work.

PAM does not reach zero. 130 wakeups per minute is still 130. The difference is the baseline: a native app with a small persistent runtime, instead of a native app plus a second runtime that has to keep busy.

Reading the battery number

0.05 mAh and 0.66 mAh over 10 minutes are both small. A single idle session will not drain anyone's phone.

The ratio is the useful part. A chat app spends most of its day open and idle or sitting in the background. If idle draw stayed linear (we did not test past 10 minutes, so treat this as arithmetic, not a measurement), one hour would be about 0.3 mAh on PAM and about 4 mAh on RN. Multiply that across a day, and across every app on the phone that keeps a runtime awake, and users start to notice.

Where PAM still loses

Idle is PAM's widest margin. It does not win everywhere. These are the losses in our measurements:

  • Rendering a 10,000-item list: 991 ms on PAM vs. 654 ms on RN.
  • Video playback: 61% CPU vs. 55%.
  • Reopening the app: more network traffic, 26 KB vs. 5.2 KB.
  • Keypress-to-pixel filtering in the synthetic suite: 70.5 ms vs. 49.1 ms.

One detail on that last item, because it is easy to misread: it comes from a synthetic benchmark with a minimal app on an Android 16 emulator, run against React Native 0.85.3 with Hermes. In Zé Chat on the Galaxy S10, search from keypress to filtered list was 51 ms on PAM vs. 133 ms on RN. Both numbers are real. They measure different things, and we did not want to show only the one that favors us.

With heavy work on screen, the gap shrinks, and in some cases RN is ahead. The ceiling for any framework is a fully native app. PAM gets close to it when there is UI on screen, but it does not beat it.

What these numbers do not tell you

  • One device. Everything comes from a single Galaxy S10. Other phones, Android versions and battery conditions may produce different results.
  • Three runs. Medians of 3 runs show a direction. They are not a full statistical study.
  • One app. These are numbers for our two builds of Zé Chat, not a statement about every React Native app. Another RN app, built differently, may idle better or worse.
  • Candidate builds. Some PAM numbers come from candidate builds that are not yet in the public release.

If you compare frameworks on your own app, one mistake to avoid: measuring only the foreground. In our case the background scenario showed the largest gap, and it is the state a chat app spends a lot of time in. Measure both, on a real device, over several runs, and compare medians.

Trying it

PAM Native is open source under Apache-2.0. You write the app in typed PHP 8.5 and ship it to Android and iOS.

  • Install: composer require pushinbr/pam-native
  • Docs: push-in.github.io/pam-docs/native/overview/
  • PAM runtime: github.com/push-in/pam
  • Issues: github.com/push-in/pam/issues

We are especially interested in idle numbers from other apps and devices, including the ones that disagree with ours.

Measurements from October 15, 2026: Zé Chat, Galaxy S10, median of 3 runs. The synthetic keypress-to-pixel figure comes from the Native × PAM × React Native 0.85.3 (Hermes) suite on an Android 16 emulator. Some PAM numbers come from candidate builds that are not yet in the public release.

The code is at github.com/push-in/pam-native. If you try it, open an issue with what you find, or leave a star if the project is useful to you.