App suspend behavour
-
Multitasking is not the best feature on the phone yet. When i open different apps (browser, telegram, SMS (yes, i still use it), dialer, calculator, email, system settings) for daily, use i can't switch flawless between them.
Especially the browser refuses to work and reloads the startingpage every time i access it. (very bad)
The other apps sometimes surprisingly work still after one day, sometimes they hang and reload after seconds.
I didn't find a pattern for this.
As this is part of the look and feel of the system i wanted to discuss this... -
It's not quite clear from your post what exactly you're complaint is, or what you are expecting. Could you perhaps elaborate to clarify? Maybe post a video showing what you think is "very bad" here?
I've just tried opening many apps on my Nexus 4, and it's a fairly smooth experience switching between them. What device are you on?
-
@htc_tattoo If you just want to stop an app suspending the ever useful UT Tweak Tool can do that.
-
@lakotaubp Though, if the complaint is about "flawless" switching, I pretty strongly suspect it's not the app suspension that's the issue.
-
@dobey You may well be right. Just thought it worth a mention it all helps
-
In this context: When you start in the terminal-app any process, as test you can use
sleep 600
, and you swipe to some other app or suspend the phone, this process receives SIGSTOP. Why? -
@guru Because Terminal app is bound by the application lifecycle policy, and thus so is any child process of the Terminal app. When an app is placed in the background it is sent SIGSTOP after a few seconds, and when brought back to foreground, is sent SIGCONT.
However, the special case of the Terminal (as you run CLI tools inside it) is different from apps that do not have user-directed child processes. It's also not something which would itself cause the presumed issues from the OP here.
-
@htc_tattoo one thing I struggled with multitasking on ut was about background tasks being killed and having to restart when I switch back to them. For example switching between browser and email to check something while writing the mail. this https://forum.xda-developers.com/ubuntu-touch/help/stopping-ut-killing-apps-t3424764 is my workaround for that. Im not sure this is the best solution, especially for the lifetime of my storage, but so far it works for me
-
@doniks The best solution would be to fix memory usage and similar issues, across the board. Are there open issues for these cases? The best start to a solution, is to first document the problem. Then we can fix bugs and optimize code to perform better on lower end devices.
-
@dobey I agree. It's just that I didn't actually hear many people talk about this. Then I wasn't sure whether maybe it's Nexus 7 specific, and then the 'deb' was never really supported by anyone, and I don't have the impression that I can make a very crisp root cause analysis and it's probably quite intertwined and .... ok, I could also stop making excuses and just check the bugtracker and write an issue as best as I can ... let me try that instead
-
Ah, but seriously: I remember now one of my thoughts, which actually kept me from writing the issue: I'm not sure whether I have an issue about memory consumption. I don't even really have an issue about the killing of background apps.
Functionally, what I care about is: I want to switch back and forth between browser and email client. I want to do this repeatedly and step by step write an email while looking up things in the browser. Or vice versa: I want to write a forum post, while I repeatedly refer back to some emails, or maybe an attachment there.
I am sure that with the current installation, this workflow doesn't work out of the box, because the background apps are killed, which in turn is because I'm running out of memory.
I could imagine that a waste of memory is at fault. That might be the OS, or any of my open apps.
Or it could be that we are doing the best with the memory, but there just ain't enough memory. And actually the apps should do a better job of saving their state (which email draft were you working on, what is the scroll position that you where at, where was the cursor positioned, what was the qml page stack underneath you). But maybe the toolkit needs to actually support such "rich state saving". And maybe the OS needs to do a better job at restarting apps faster and having a higher resolution screenshot stored such that the time-to-restart is covered a little better.
Or it could be that we simply don't want to bother supporting devices with less than X memory, so it's a wontfix.
So, there we go, practical question: Do I raise the functional issue "Bad user experience switching between browser and email client", or do I raise the technical issue: "No fluent multitasking due to high memory consumption" ?
-
@doniks said in App suspend behavour:
So, there we go, practical question: Do I raise the functional issue "Bad user experience switching between browser and email client", or do I raise the technical issue: "No fluent multitasking due to high memory consumption" ?
Well, the issue is with only those two apps open, one will get killed due to memory, right? That is an issue, or rather, probably multiple issues. I can tell you for certain we are not doing the beset with the memory. There are many optimizations that could be made across the system, and in apps. If I understand correctly how Dekko is implemented, there is almost certainly many places it could be improved.
As for the second part, it's probably more directly in apps. Even if apps get killed, they really need to handle saving state properly when they get paused as you move them into background, and restoring properly when starting in the event they did get killed. Session management is a feature that most app devs tend to traditionally not implement, simply because they think it's too hard, and they don't think it's necessary on traditional systems (despite it being a possible feature for decades). I'm not sure how much easier we can make it to implement, from a toolkit/SDK perspective though. That's something I'll have to think about a bit more.
-
I tried to find a pattern to reproduce this issue. But there is none. The best way is to restart the phone, open the browser + uapp-explorer+youtube-app. Load something and begin switching. Mostly it works in the actual RC channel well, then something starts hanging which makes the browser restart and reload the startpage.
Same thing happens with browser+N5-camera that crashes. Email i didnt test since dekko2 has problems.
I also saw with systemsettings., but not often.
Could be an out of memory issue, but i could not trigger it... -
This post is deleted!