[Galaxy S6 / S6 Edge Unified Development] nadejo:
[MENTION=4898097]arter97[/MENTION] it seems the most important task to get good performance on touchwiz is to keep relaunching background apps in memory regardles of how the lmk behaves. because:

senario: imagine playing a game ,cache is getting bigger and so other apps(that are usally allways running in background) getting killed.

Problems:

1. the lmk killing a process will just cause the app or its service to relaunch in background(which can be random). this is actually causing more lag because launching a service or app in the backgraund will affect cpu load. means it takes a part of the cpu load even if that is just 2% it will cause lag because the game tries to adapt to the new cpu load that is shared with relaunching background processes.

And if you say lmk will not allow relaunching those services remember that games caches do also shrink for example after loading a map or at the start of a level. and there performance goes south.

2. here things get worse. now that the game lost performance its cache starts bloating because the game doesnt get the cache computed in given time. but the cache (wich needs lesser computing power) grows bigger because cached graphics are not rendered yet.

3. snowball effect takes place: now that the cache is bigger, even more apps that can relaunch will stopp in background and restart and very high cpu load is used constantly by background apps the game can no longer adapt to the free ram because the ram space is conststantly changed by secondary apps, making the lmk pointless, creating massive constant lags.

as long there is no app that will keep those on a white list lmk will cause nothing but lag. killing those tasks will also affect battery life.

at the moment i got 35 apps processing in the background. the s browser im typing this is using 426mb ram i got only 500-600 mb left but. there is no lag at all no matter what game i play. soon as i stop apps there will allways be lags during gaming or browsing till all apps are back launched in background by themselfes.

i can go in detail and do some testing to capture this issue and share it if some one is interested in this.

hope there will be a proper solution for this. i remember there are scripts to keeps background services in memory but not sure if they work on touchwiz.

thats also the reason why smartmanager says: "kill following apps to get better performance" and shows your recend apps instead of your background apps

if people think by disabling background apps or deleting them they benefit, they dont because the system will allways try to keep around 30 apps runnig. so imagine you got a bloated tw rom 260 apps 30 running in the background.

- you debloat it and even choose mostly apps that youve seen in smartmanager and restart your phone. there you go new 30 apps in background that were not even running before. so by removing those apps you just might have allowed the system to place even bigger tasks in the ram. so debloating might even ruin the performance of your phone. remember tasks you see in smartmanager after a restart will allways be there, you can kill them, take a nap and they are back.

and trust me if the system is running out of own apps. it will place user apps on your ram. your ram will allways be in use no matter what you do. and by letting them just run in background you giving them lesser chance to ruin your performance.

lets say you somehow managed to have only 5 background apps means you disabled around 160 apps or use the dev option background limit. any app that was connected to the touchwizframework that would rather run in background, you got it now yelling timber errors and warnings in your phones logcat causing lags aswell.

maybe arter finds a way to get all background cache on a swappartition ;) even if it sounds crazy