Android P frequently refreshing apps in background - Google Pixel 2 XL Questions & Answers

I usually leave chrome in background after scrolling in websites, to continue later where I left. Before android P, chrome was never refreshing unless I reboot the phone, but on android P it refreshes frequently. The page reloads after switching back to chrome after a short time. Tried turning off adaptive battery but it didn't help. The last thing I can try is turning off battery optimization, but it may cause battery usage. Anyone else having poor memory optimization on android P, or a solution?

You must be the exception because I'm pretty sure majority of people, including myself, get Chrome pages to reload relatively easy. And it not needing to reload until a reboot sounds crazy to me. LOL
Sent from my Pixel 2 XL using Tapatalk

EeZeEpEe said:
You must be the exception because I'm pretty sure majority of people, including myself, get Chrome pages to reload relatively easy. And it not needing to reload until a reboot sounds crazy to me. LOL
Sent from my Pixel 2 XL using Tapatalk
Click to expand...
Click to collapse
I was keeping chrome open in background for days and it still wouldn't reload on android 8

Well it's aggressive memory management has always been a downside since day one. Not just with chrome but with any app. You never experience it until now?
hewewe said:
I was keeping chrome open in background for days and it still wouldn't reload on android 8
Click to expand...
Click to collapse
Sent from my Pixel 2 XL using Tapatalk

EeZeEpEe said:
Well it's aggressive memory management has always been a downside since day one. Not just with chrome but with any app. You never experience it until now?
Sent from my Pixel 2 XL using Tapatalk
Click to expand...
Click to collapse
I mainly experience this problem with chrome in Pixel 2 XL. I found some settings in chrome:flags. Searched memory there and enabled Memory coordinator and Memory ablation experiment (selected just "Enabled"). After this, I did some tests and chrome didn't reload. Can you also try these settings? I'll need to see for some more time to tell if these really work.

Related

"Don't keep activities" - anybody use it?

Love the phone but a few times the launcher has redrawn after exiting an app because of most likely memory issues. Anybody using this option? Assuming over time this would keep more memory free and reduce this issue. Any thoughts?
Sent from my Galaxy Nexus using xda premium
mobilehavoc said:
Love the phone but a few times the launcher has redrawn after exiting an app because of most likely memory issues. Anybody using this option? Assuming over time this would keep more memory free and reduce this issue. Any thoughts?
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
This is one of the reasons why I don't like that Google included these developer options pre-installed on this phone. They're developer options for a reason, we can install them if we need to.
This feature is designed so that developers can test their app to be sure that data is properly saved when is no longer in the foreground. For example, if a user receives a phone call or jumps to another app, the app needs to do what is necessary to save it's data. At times, Android can kill a process in the background. If the user plans to go back (perhaps they finished the phone call), they want to see what it is they were working on last. The developer is supposed to handle this case by rebuilding everything as it was before (to provide that seamless experience for the user when switching between apps).
This debug feature helps us test that it works.
For the average user, all you're really more likely to do is slow down your apps. As they will have to rebuild themselves when you resume them, and you may even open yourself to more quirky bugs (for those apps that didn't properly test the above scenario).
So please don't enable it unless you're doing it for development purposes. My 2 cents.
*EDIT* Here's a page from the Android Dev Guide justifying my explanation:
http://developer.android.com/guide/developing/debugging/debugging-devtools.html
Immediately destroy activities
Tells the system to destroy an activity as soon as it is stopped (as if Android had to reclaim memory). This is very useful for testing the onSaveInstanceState(Bundle) / onCreate(android.os.Bundle) code path, which would otherwise be difficult to force. Choosing this option will probably reveal a number of problems in your application due to not saving state. For more information about saving an activity's state, see the Activities document.
Click to expand...
Click to collapse
(and yes, they used to call it "Immediately destroy activities")
Thanks. I turned it off. Did notice some bugs while on. I just wish with 1GB of RAM the launcher wouldnt have to reload. Hopefully things get better. Might just be my apps but it happens quite often when leaving the browser.
Sent from my Galaxy Nexus using xda premium
mobilehavoc said:
Thanks. I turned it off. Did notice some bugs while on. I just wish with 1GB of RAM the launcher wouldnt have to reload. Hopefully things get better. Might just be my apps but it happens quite often when leaving the browser.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
weird.. how many widgets do you have on your launcher? the more widgets you have, the slower the launcher is.
Have you tried another launcher? The stock launcher has never been known for being fast and efficient, although I haven't had any issues with it (whereas I'm a LauncherPro fan on my other devices).
kwazi said:
weird.. how many widgets do you have on your launcher? the more widgets you have, the slower the launcher is.
Have you tried another launcher? The stock launcher has never been known for being fast and efficient, although I haven't had any issues with it (whereas I'm a LauncherPro fan on my other devices).
Click to expand...
Click to collapse
I have quite a few Widgets but nothing too crazy I don't think. I use LauncherPro on my other devices as well but I love this new launcher so I'm going to stick it out. Like I said the most common task that causes the issue is when I'm using the web browser and then come out of it. Otherwise its been stable. I've noticed the same thing with Honeycomb on my Xoom so it might just be one of those things I have to put up with.
Sent from my Galaxy Nexus using xda premium
i'm also noticing some redraw and occasional lag when hitting the home button.
I'm hoping that CM9's custom launcher will have an option to lock it in memory- that may increase the performance by a lot.
also when replacement launchers like go launcher start optimizing more for ICS those might be good options.
Have you tried converting your launcher into a system app? You'll need to use Titanium Backup Pro or something similar to do it for you, or simple copy the APK into your system/app folder... Really sped up my launcher!
shawnshine said:
Have you tried converting your launcher into a system app? You'll need to use Titanium Backup Pro or something similar to do it for you, or simple copy the APK into your system/app folder... Really sped up my launcher!
Click to expand...
Click to collapse
Did you see the date on this thread, almost 8 months old
Sent from my Galaxy Nexus using xda premium
95Z28 said:
Did you see the date on this thread, almost 8 months old
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
... and yet people still continue to discover the thread and benefit from it.
Thanks for clarifying the meaning of "Don't keep activities"
my razr xt910 cannot be counted upon to run smoothly with all the apps simultaneously running and forcing itself to go into reboot. i then fancied an iPhone single styled system (as compared to Android multi-talks) cuz iPhone looks robust and responsive. all the killer that claimed to do the job looked more of a farce and then when i stumbled upon the destroy activity i was like OMG. srsly b4 using it I've only got just inner 100mb of ram, after using it i have a whooping 400mb ram. UI appears faster and all. regarding the relaunching of apps and battery life being used up. i think I'll start to worry about it on a later date. what say any body. ooh yes to add on, even after i deleted 40 apps on my phone it still hanged like fcuked. i guess i can reinstall them back again and not have to worry about it. btw i can't seem to root my xt910 for nuts so i can't custom ROM it along with all other fanciful mods that i hear about what others did to their phones.

Why don't browser pages stay in memory?

I've been wondering why my browser tabs get kicked out of memory after so long. Usually if I take a phone call or switch into a large app and return to the browser, I have to reload all my pages. I normally have 3-5 tabs open at once. With VZW's slow 3G it's a pain to reload and lose my place. Doesn't this phone have 1GB of RAM? I wouldn't think a phone call would cause the browser to be removed from memory would it? This has been plaguing me for years just wondering if there was anything I could do to prevent it.
Sent from my Galaxy Nexus using XDA App
Yes its just something to do with the latest ICS version, memory management is more aggressive with the browser or something. It drives me mad too. Sometimes ill switch to the homescreen for one second without loading a single thing, go right back to the broeser and it was kicked from memory.
Is the behaviour the same in the new Chrome Beta?
Yup, I find this a bit annoying, too.
DirkGently said:
Is the behaviour the same in the new Chrome Beta?
Click to expand...
Click to collapse
It doesn't seem to be. I've just had a test and it seems to keep all pages open.
Open browser -> load page -> menu -> save for offline reading
lilirose said:
Open browser -> load page -> menu -> save for offline reading
Click to expand...
Click to collapse
But wouldn't you then have to do this for each tab?
Because Android doesn't offer true multitasking. It closes apps you are actively using and caches apps you don't ever use... Poor memory management and aggressive task closing makes for a poor user experience.
EP2008 said:
Because Android doesn't offer true multitasking. It closes apps you are actively using and caches apps you don't ever use... Poor memory management and aggressive task closing makes for a poor user experience.
Click to expand...
Click to collapse
Yep. It's a little too aggressive. It's most annoying when i'm using Spotify or something. I might pause the music for a little while for whatever reason, run a couple apps. When I go back to Spotify I have to restart the whole app.
It should intelligently monitor usage and cache apps based off that...
tweak your VM settings, as well as min free settings.
My pages has always stayed in memory
s2d4 said:
tweak your VM settings, as well as min free settings.
My pages has always stayed in memory
Click to expand...
Click to collapse
Mind providing some examples and/or guidance on how to accomplish this?
s2d4 said:
tweak your VM settings, as well as min free settings.
My pages has always stayed in memory
Click to expand...
Click to collapse
Yeah this is what i want to try and tweak the oom numbers but i just been too lazy...
Hmm. I have never used Spotify before, but that sounds way too aggressive. I use slacker.com and if i pause it there does not seem to ever be a problem going back and having the song pick up right where i left off. Google listen seems to do the same. Now don't get me started on the one or two times per day slacker causes my galaxy nexus to reboot ......
rudolphe said:
Mind providing some examples and/or guidance on how to accomplish this?
Click to expand...
Click to collapse
Need it too...
I never experienced this. I have chrome and chrome beta with bunch of tabs in each of them open and they always stay there. I am on stock 4.1.1 and i have stock android browser disabled.
Sent from my Galaxy Nexus using xda app-developers app

Galaxy Nexus multitasking issue

Android is praised for having 'real' multitasking. But why does it have to 'suck' on a phone with 1GB memory?
Chrome starts to reload 3-4 tabs only if it's the only app 'opened' (of course there are other background services. but I don't have much running services, map, google messaging service, keyboard, )
I think it could also be problem with app. app not releasing memory resource when goes to background.
But it's really annoying to see that apps activity needs to be created again from scratch after opening a few apps.
Please discuss your opinion here.
Bayint Naung said:
Android is praised for having 'real' multitasking. But why does it have to 'suck' on a phone with 1GB memory?
Chrome starts to reload 3-4 tabs only if it's the only app 'opened' (of course there are other background services. but I don't have much running services, map, google messaging service, keyboard, )
I think it could also be problem with app. app not releasing memory resource when goes to background.
But it's really annoying to see that apps activity needs to be created again from scratch after opening a few apps.
Please discuss your opinion here.
Click to expand...
Click to collapse
No problems here..
try to avoid apps with high memory usage, one being the Facebook app
crixley said:
No problems here..
try to avoid apps with high memory usage, one being the Facebook app
Click to expand...
Click to collapse
I don't have facebook running as I've said earlier. I don't even have it installed.
But I"m still not convinced that it's the BEST android multitasking could have. it's too aggressively killing background activity..
Bayint Naung said:
I don't have facebook running as I've said earlier. I don't even have it installed.
But I"m still not convinced that it's the BEST android multitasking could have. it's too aggressively killing background activity..
Click to expand...
Click to collapse
Get autokiller from the market and adjust the settings then. You want lower numbers in the app to allow more applications to stay active. Note that some apps might just kill background memory use, there's nothing you can do about that one.
Doing this might make your phone more laggy. You need to decide for yourself what the best trade-off is for you.
When exactly does it do it? I have 5 tabs open and I'm good! Is it after a while of inactivity?
Sent from my iPad using Tapatalk HD
I have never noticed this issue.
Sent from my other android devive using Tapatalk 2
z06mike said:
When exactly does it do it? I have 5 tabs open and I'm good! Is it after a while of inactivity?
Sent from my iPad using Tapatalk HD
Click to expand...
Click to collapse
It's not a refresh (like refresh web page), I think it's just re-rendered from the cache..
even though I'm android fan, I'm jealous how iOS manage to run pretty well for daily use with 512MB... probably dalvik JIT is culprit here?
I personally think this is a problem with chrome and this is the reason I don't like chrome because it runs a constant large service at 70+ mb at all times which takes away from general multitasking of the phone. My guess is this is related to your problem. Persistent services on android are rather powerful and when one is too large it has detrimental effects. Maybe others don't experience this with chrome, but I did, and that's why I stopped using it.
Yes, chrome is worse than stock browser.
Stock can maintain usually 4-5 tabs easily without reloading.
Hopefully Google could do something with both chrome and improve OS multitasking capability.

Recent Apps "Kill" Otions

Below is a screenshot of the recent apps button on my OP3. I'd like to know what the difference between the two button options circled in red numbered 1 and 2 are.
Thank you
shobuddy said:
Below is a screenshot of the recent apps button on my OP3. I'd like to know what the difference between the two button options circled in red numbered 1 and 2 are.
Thank you
Click to expand...
Click to collapse
One option will just clear the application tray, and other option will clear it from the memory.
raj.parekh07 said:
One option will just clear the application tray, and other option will clear it from the memory.
Click to expand...
Click to collapse
Is there a way to put a shortcut on my homescreen to the clear from memory option
shobuddy said:
Is there a way to put a shortcut on my homescreen to the clear from memory option
Click to expand...
Click to collapse
Why would you even want to do that? You have 6GB of RAM to use!
Sent from my OnePlus 3 using Tapatalk
Explorer23 said:
Why would you even want to do that? You have 6GB of RAM to use!
Sent from my OnePlus 3 using Tapatalk
Click to expand...
Click to collapse
also, constantly clearing RAM wastes MORE battery since services will be restarted every time
2x4 said:
also, constantly clearing RAM wastes MORE battery since services will be restarted every time
Click to expand...
Click to collapse
Yup, more power consumption plus the fact that loading apps fresh each time provides worse user experience (slower operation).
There is absolutely no reason to clear RAM on powerful modern devices. Even I - the person that always kept clearing recents and even using memory cleaners on older devices - got used to keeping everything in RAM. And I'm happier than ever
Sent from my OnePlus 3 using Tapatalk
Explorer23 said:
Yup, more power consumption plus the fact that loading apps fresh each time provides worse user experience (slower operation).
Click to expand...
Click to collapse
Yes, but it depends on how frequently you are opening and closing apps. If you don't use an app all that often, there is no harm in clearing it.
2x4 said:
also, constantly clearing RAM wastes MORE battery since services will be restarted every time
Click to expand...
Click to collapse
I don't intend to do it constantly but want to have it available when I DO want to do it. For example, If I use Facebook once a day, I would rather not have it constantly running in the background.
Explorer23 said:
Why would you even want to do that? You have 6GB of RAM to use!
Sent from my OnePlus 3 using Tapatalk
Click to expand...
Click to collapse
It seems the "clear ram" feature actually hibernates apps. i.e it does a "Force Stop" in the Android app settings. This is behavior I want to preserve battery, particularly for apps I don't use all that often.
shobuddy said:
Yes, but it depends on how frequently you are opening and closing apps. If you don't use an app all that often, there is no harm in clearing it.
I don't intend to do it constantly but want to have it available when I DO want to do it. For example, If I use Facebook once a day, I would rather not have it constantly running in the background.
It seems the "clear ram" feature actually hibernates apps. i.e it does a "Force Stop" in the Android app settings. This is behavior I want to preserve battery, particularly for apps I don't use all that often.
Click to expand...
Click to collapse
FB and similar apps are a perfect example of why it's a terrible idea to clear RAM - ever try force closing it? It always re launches itself without fail, even with root and apps like Greenify
Well, if you don't want to to kill apps often, you don't need a shortcut. It's just 2 taps away anyways (recents > kill).
Natively you can't get a shortcut. Maybe could be done with Tasker or something similar, but I'm not sure.
After all apps in RAM don't really consume power so you won't see any benefits if you do force stop stuff that you don't use often. The difference is negligible, there are a lot more factors that make much bigger difference.
Sent from my OnePlus 3 using Tapatalk
Is #2 in the screenshot the same thing as doze?
shobuddy said:
Is #2 in the screenshot the same thing as doze?
Click to expand...
Click to collapse
no

How to prevent Android from killing apps?

So, I have this issue, where most of my apps can't stay in recent apps overnight. They all get killed, all but 5 I have noticed. I did the battery optimization thing for all apps I use on a daily basis. I have edited build.prop file and added sys.keep_app_1=com.whatsapp and so on for the rest of my apps. I also did that in the local.prop file. None of it worked. How to prevent my phone from killing apps overnight?
Nobody?!
Nabukodonosor said:
Nobody?!
Click to expand...
Click to collapse
If you are rooted you might try the app LSpeed and use one of the build in RAM profiles.
I am rooted. OK, I will try it. Thanks. It shuts my app very VERY aggressively. For instance, I was watching some youtube video yesterday, and in the other app I was searching for some products and was going back and forth between YouTube and Google Chrome, and every couple of times it restarted YouTube app, even though I was using it 2 minutes ago.
Nabukodonosor said:
I am rooted. OK, I will try it. Thanks. It shuts my app very VERY aggressively. For instance, I was watching some youtube video yesterday, and in the other app I was searching for some products and was going back and forth between YouTube and Google Chrome, and every couple of times it restarted YouTube app, even though I was using it 2 minutes ago.
Click to expand...
Click to collapse
Both youtube and chrome are resource hungry apps, that's why it keeps reloading.
I guess your device is 3 gb version as mine.
Mi A2 Lite cihazımdan Tapatalk kullanılarak gönderildi
It's 4/64gb version.
Nabukodonosor said:
It's 4/64gb version.
Click to expand...
Click to collapse
I have the 4 gb version as well and I don't face such an issue, if nothing works try factory reset, absolute solution :good:
Tried it already, didn't work. Try leaving 10-15 apps opened in the evening, and see in the morning if they are still in recent apps. And tell me tomorrow.
thorin0815 said:
If you are rooted you might try the app LSpeed and use one of the build in RAM profiles.
Click to expand...
Click to collapse
It didn't work.
Nabukodonosor said:
It didn't work.
Click to expand...
Click to collapse
Well, then you probably need a custom rom. Android One is known to be optimized for dumping non needed tasks. You could try to disable battery optimizing for the apps you would like to stay alive.
Tried that too, didn't work.
My previous phone was 2Gb running android 6. Now i have a mi a2 life 4Gb and it is OK except for 2 games.
Apparently there's some AI that learns what you use but after many weeks no change.
Most apps open pretty fast. It's only these 2 games that I run daily. Annoying to have to wait for them especially since the old phone was able to keep them cached.
I tried the low-memory config (magisk module) but it didn't help. I guess android has changed its algorithm. I'm resigned to it.
It's insane. What's the point of having 4, 6, 8 or 10GB of ram if you can't use it?!
Connect it to a monitor, install Taskbar app and SecondScreen app, enable Freeform windows and turn your phone into a mediocre PC. Assuming you can get all the resources back from OS's hidden service threads of course.
Facing the same issue
facing same issue specially after android 10 update. Change apps back and forth even in recent apps menu kills the app. My phone is 4/64.
shak33l said:
facing same issue specially after android 10 update. Change apps back and forth even in recent apps menu kills the app. My phone is 4/64.
Click to expand...
Click to collapse
Android 10 has a known problem. Rebooting helps. For how long seems to vary. I get a week or so, some people only get a day.
I had the same problem when I was unrooted during the Android 10 update crash. After rooting and installing Lspeed again, Android is not killing apps anymore as I set these settings

Categories

Resources