I'm looking for ways to improve UI against lagging for Android devices with 256MB of memory. The memory is so limited that large frontend apps trigger a lot of swap-outs for other apps.
The idea is: If an background app (a Facebook app for example) is not necessary to run continuously, unlike, say telephony, which must stay uninterrupted, just pause that app's process, and continue to run it every a few minutes to retrieve updates, only when the cellphone is idle in the pocket, and then pause the process again.
For reducing lag swapping out other apps' memory, I want the paused apps' memory can be proactively swapped to disk/flash, so the RAM can be instantly released in order the frondend app needs. (reference speed: class 10 SDHC: 10MB/s write, so the browser lags for 2 seconds if a webpage need to claim 20MB RAM)
So my question is: How to force the system to swap a paused process' private memory into disk/flash?
An inactive process goes automatically in swap if ram is required, because he has a lower priority (see priorities on android).
Theorically, a class 10 card is good and could only make swap in 2 seconds, but the card's memory controller is so long that you will have 5 or 6 seconds. Having more that a class 6 is not usefull.