3 ms·
From experience (not with Termux but persistent services in general) this partially works. The device will really throttle the CPU / network when the screen is
by denysvitali 2y ago
From experience (not with Termux but persistent services in general) this partially works. The device will really throttle the CPU / network when the screen is off.
This means that your HTTP request instead of taking <200ms will now take 5s.
Or at least, this is my experience with a custom app I wrote for Android 13+ running on a Xiaomi device (veux).
As soon as you turn on the screen (no need to unlock the device), the web server is immediately responsive as it should be
- tripflag 2y agoThat's curious; maybe this is device/distro-specific? I've had good experience using this approach to transfer files to both my tablet (Samsung s2, lineage) and phone (pixel7, grapheneos). Or maybe Termux is pulling some additional tricks to avoid this issue?
- denysvitali 2y agoIt could be that my device is heavily throttling for saving battery: the device battery (even with this long-running service) lasts multiple weeks on a single charge.