[LG Optimus 2x] tonyp:
Re: [ROM][old|new bl] ParanoidAndroid v2.6 - build 08 [Feb 22] [linaro][stable][smoot

Well, i agree that the launcher might get killed slightly too early for my taste as well.

Although I can multitask between the xda app, SMS, Gmail and gtalk without it getting killed.

As soon as you open your browser and load a rich webpage the launcher goes boo boo though.

Let me elaborate a little here, as I have been working on the memory management part for the last build.

I don't really like the default memory management of android. It works great in devices with a decent amount of ram, like my nexus 7, but isn't working that great on low memory devices.

This has been better in older android versions. With better hardware Google added some scaling algorithms to adjust the memory management to the amount of ram, beginning with ICS.

This works pretty well for mid and high end devices, but not on low end ones (in terms of ram) like ours.

In earlier versions I followed the approach the V6 Supercharger is doing.

Slightly changing the minfree (when to kill apps) and adj values (priority of apps to get killed).

While analyzing androids memory management in depth I noticed that the method of adj changes the V6 Supercharger is doing is kinda bad.

As I said above, Google changed a couple aspects here starting with ICS. But the Supercharger is still doing the same old GB approach.

By increasing the priority of the launcher (HOME_APP_ADJ) it messed with some new hardcoded android functions (in the ActivityManagerService) which directly address this value.

This can lead to a memory overhead, which we obviously should avoid on our low ram device.

I had reverted all adj adjustments in build 06 and 07 - but that resulted in a couple slowdowns, which some of you noticed.

(this shows again that the default memory management configuration isn't working well for devices with low memory).

So with build 8 I brought some small (and safe) adj adjustments back.

You should notice that the ROM doesn't run into slowdowns that often anymore :)

I'm quite satisfied with the result, except for the launcher (especially as the stupid xperia launcher looses the alphabetical sort in the app drawer).

But I could not adjust the launcher that way anymore without screwing up androids default memory management.

I will work on that for the next builds.

The only safe way to protect the launcher is with some deeper changes of androids ActivityManagerService.

But I wouldn't change anything there until I'm 100% sure my changes are a) beneficial and b) won't have any negative side effects.

Which means: I need more time to analyze this property.

This requires some more research and needs to be done very carefully.

Until then you got 3 choices.

1) choose a launcher with an "keep home in memory" option. I wouldn't suggest that, the option is fine for phones with more ram, but as we're constantly on the edge with jellybean anyways we shouldn't do that.

2) apply the v6 supercharger, with the bullet proof launcher option. As I said, this has negative impacts on android, so i wouldn't do that either.

which leaves 3) make sure you enabled zram and consider enabling swap, to virtually increase your ram.

Edit: oh there's 4, you could decrease the minfree value in the PerformanceControl.

But note that this can lead to lags if set too low.

I'll post about some other suggested values for the PerformanceControl app this evening.

Probably the most important part, which applies to all options above.

Get your background processes down.

Especially Facebook is reserving quite some memory. That's why I switched to the "Flipster" app (check the play store).

Additionally I'd suggest disable the location service of gmaps and only enable it when you actzally use it - or its constantly running in the background as well.

By disabling services like that you can drastically increase the amount of ram other apps can use.