205 points · by JoelMcCracken · 14y ago · 86 comments
This, however, is not "impact-less": when running truly memory-intensive games, they will experience performance degradation while the OS performs cleanup and shutdown of the various applications "hibernating". This is sensible on games like Infinity Blade.
iOS also suffers from not allowing the user to make a distinction between "not running or hibernating" (no resource consumption) and "keeps your GPS or data connection active" (very high battery drain), and not providing a way for the user to know which application requested what (in the way the "Notification" settings let you control notifications rights for all applications, or iOS5's new "General > Usage" gives you a size estimate for the system's applications).
I also believe this:
> 5. Five classes of apps - audio, GPS, VOIP, Newsstand and accessory apps - and some built-in apps such as Mail may run indefinitely in the background until they complete their task.
is partially incorrect in following 4.: these applications can all be killed as memory pressure on the system increases, however they have a "higher priority" (and thus will be killed last) compared to suspended applications.
I'm not 100% sure, but I think this is mostly due to how memory warnings are staged.
I think the sequence is: OS sends a level 1 memory warning to any running applications. Then it starts killing backgrounded apps. If it kills 'em all and memory is still tight, running apps get level 2'ed. Then it starts killing running apps.
So a well behaved game that's running close to the capabilities of the device is likely to do a bunch of stuff that will impact its performance when it gets that level 1 warning. It's going to purge caches and otherwise free a bunch of memory, and you'll see stutter. Furthermore if Mail.app and friends are running, they are probably also going to get warned and eat some time cutting memory use.
Again, I don't know the exact cost, but I think killing suspended processes is pretty cheap and it is really the memory warnings that cause a stutter.
Might be, my point is mostly that iOS's application management is not as painless and transparent as TFA makes it sound, there are (edge) cases where "not managing background tasks" impacts the experience even when all applications are correctly coded and well-behaved.
While he's correct in stating that the multitasking bar does NOT show apps currently running (just the apps that were recently used, regardless of state), he fails to point that deleting the apps there WILL indeed move the apps from Background or Suspended to Not Running, effectively freeing memory and CPU.
And this is exactly the intention of those "authoritative sources" that he criticizes. The recommendation to kill background/suspended apps is an effective (and the only official) way to manually solve battery drain or memory on the 5% of cases that iOS can't do by itself.
I'm willing to believe (as I have never specifically tested this) that suspended third-party from-the-App-Store ("User") applications are immediately killed without this first stage (although then it would seem weird that they participate in the cross-application memory warning system at all), but the default Apple-provided ("System") applications (such as Safari, Mail, etc.) definitely get this opportunity.
According to the iOS Application Programming Guide[0],
> Suspended apps are not notified of termination but f your app is currently running in the background state (and not suspended), the system calls the applicationWillTerminate: method of your app delegate.
(this is the iOS5 doc, but the iOS 4 version essentially said the same thing)
So a suspended app is killed immediately, a running (backgrounded) app gets the standard applicationWillTerminate: message.
[0] http://developer.apple.com/library/ios/#documentation/iPhone...
“People shouldn’t have to understand multitasking. Just use is [sic] as designed, and you’ll be happy. No need to ever quit apps.” – Steve Jobs’ email, June 29, 2010
another email too: http://forums.macrumors.com/showthread.php?t=955236
regarding quitting apps to save battery life: "You don't need to do that to save battery life. Trust the iPhone."
There's definitely no indication for "chewing up all your data in the background" though, but thus far I've personally found no need for it. An app that's chewing up data in the background is usually fairly obvious - Skype, Pandora, etc.
That said, there are a few cases where closing all the background apps makes a difference with a game. Some games (I've seen it on Worms: Armageddon, Angry Birds, and a few others) can lose their fluidity, I think the problem is memory allocations. Closing all recently used apps (thus forcing any that are suspended into the not running state) can fix this.
This was much worse on my 3G. The problem is very rare on my iPhone 4.
But for normal users, it's perfectly possible to use the phone for months and never need to close a single app manually.
Which is why Apple did not enable it on the 3G in the first place. (did you jailbreak it, or are you talking about the 3GS?)
But it's a game by game thing. I don't remember ever having problems with Flight Control or Peggle. Even some fancier games don't seem effected, while Angry Birds would hit the problem. Interestingly, Angry Birds would get better if you went to the level select and then back into the level.
Unfortunately, I've seen a couple of apps that have somehow been able to abuse the background APIs and have killed my battery. The only way to prevent this from happening is to force quit the app from the multitasking bar. The app I've noticed this with is GroupMe. If I don't kill it after closing it, my phone gets really hot and my battery dies. I have location turned off for GroupMe.
While the advice to manually manage this is ham-fisted troubleshooting, it is unfortunately effective (cf. restarting Windows). I suspect (and would love to see more analysis on this) that some apps in the categories allowed infinite background time are behaving badly. It may only be one VOIP app running persistently in the background that drains the battery, but this advice would consequently solve that problem.
Skype is not unique. All VoiP-declared (has to register itself as such and Apple has to approve that classification for publishing on the App Store) apps act like this.
Safari uses avaliable memory for caching web pages in tabs, which is understandably at a low priority. I often find that iOS will give priority to 'suspended' apps rather than 'suspended' tabs.
In order to get safari to stop upnloading the tabs you need to free up memory manually.
This however is an edge case.
Killing it manually help us 're-start' the app so we can use it without doing the 'un-install' and 'install' all over again.
Outlined in an article I wrote recently - http://brajeshwar.com/2011/kill-a-background-app-in-ios/
I also don't think that unused RAM, (all 0s?) would use less power than used RAM.
But I think the article is accurate, you shouldn't ever have to manage apps. iOS is night and day compared to Android's task management (where iOS is much better for users).
I've never heard this "tip" from anyone. Ever. Any links or references to these "supposedly authoritative sources"?
I'm finding it hard to take this article seriously when it says:
"When you press the home button, iOS will tell the app to quit. In almost all cases, it quits..."
Then, a few paragraphs later:
"When you press the home button, the app moves from Active to Background. Most apps usually then go from Background to Suspended in a matter of seconds."
Wait, I thought you said it gets told to quit?
According to this [1], an app has to specifically request to be killed when the home button is pressed. "When the value of this key is YES, the application is terminated and purged from memory instead of moved to the background. If this key is not present, or is set to NO, the application moves to the background as usual."
The information in the article about states is useful, but why open with factually incorrect information?
[1] http://developer.apple.com/library/IOs/#documentation/Genera...
Anyway, the UIApplicationExitsOnSuspend key is for legacy apps, and has nothing to do with the article. If that key is set to YES, iOS treats your app as it did before 4.0 and restarts the app every time you switch away from it and back again. The article explains how it works on iOS 4.0 and later.
It’s correct. In almost all cases when you press the home button the app quits (i.e. gets suspended). End of story.
You are making a distinction without a difference that’s not relevant for what the article is talking about.
And you're the golden standard of iPhone-related tips awareness, because?
I have purchased 8 iOS devices and I know more people with iPhones than android. This was the first I've heard of it.
It was not my intention to suggest that I am the authority on iPhone tips. I was merely expressing my surprise that after hearing a similar suggestion practically every damn conversation I have about my Droid, that I had not heard such a thing about iPhone.
If I've been using my iPhone for a few days, and there are a zillion apps in the "Recently Used" bar, I simply reboot the iPhone - may take a couple minutes, but requires no effort as compared to playing whack-a-mole with the Launch Bar.
The article specifically points out that iOS doesn't allow apps to "abuse" background processing; you get 10 minutes and then the OS forces your app to standby. If an app uses the indefinite background processing for something other than what's permitted, then the app is rejected from the App Store, and they're very strict on this one.
The Android/ICS model you talk about is exactly the kind of process management that Apple specifically avoided in iOS, and for good reason. IMO, that's the exact sort of thing that I'd never want to do on my smartphone.
Your routine may keep you happy, but please don't respond to a well-researched and accurate article with the exact opposite of the truth; you're basically just plugging your ears and shouting "NUH-UH!" here.
The reality is that certain apps on IOS can continue to run in the background - whether that's because they are polling the GPS radio, waiting for a VOIP connection, or something else - I don't know. All I know, (And I'm speaking here as an owner of the Original iPhone, 3G, 3GS, 4, 4S who uses his iPhone multiple times, every waking hour) is that sometimes the iPhone gets hot, and the battery starts moving to 0 from a full charge in a matter of hours - when it does this, if I either (A) Reboot the iPhone or (B) shut down all of the apps listed in the "Recently used" task bar, then my iPhone is (1) No longer hot, and (2) experiences normal battery drain.
I reference the Android/ICS model because at least in _that_ world (and remember - I'm a dedicated apple users) I could tell you which of the Apps was actually sucking my battery dry.
If this were science, then it would be useful to collect a large number of observations that conflicted with accepted theory, to determine if (A) there was measurement error on the part of the observer - for example, perhaps I didn't wait 10 minutes after hitting the home button before waiting for the iPhone to cool down, or (B) There is a problem with the theory.
My belief is that it's (C) The theory is accurate, it just doesn't recognize that Apps will sometimes run in the background using more CPU than the user is aware they are, or wants them to. I just wish I had a tool to tell me _which_ app it was - then I could just shut down that _single_ app, instead of my existing reboot/shut-them-all-down approach.
This article is not, repeat NOT, presenting "theory". This article describes the way iOS is actually built to work -- it is a factual description of all and only those behaviors that iOS engages in. It is a complete, and accurate, description of iOS's behavior because it is a recapitulation of the behaviors that iOS's designers built it to exhibit.
The only contrast here is between the reality of the way iOS works (the article) and your misunderstandings of reality.
http://developer.apple.com/library/mac/#documentation/Develo...