Welcome! Pull up a chair. I'm going to explain why your iPhone bogs down, making you want to smash it into tiny little designer pieces (thanks K!). For those of you who do not care, skip to the link at the bottom of this post.
This is especially frustrating to a person who knows what the deuce is going on, but is thwarted by a company that revels in its mantra, "Look, a shiny thing!" (Don't get me wrong Apple, keep pumping out the shiny - you are one of the best in the world at it).
This is a story of bits and bytes, and how they are shuttled about.
If you have a first-gen iPhone, you probably started noticing this problem after the update to the 2.0 firmware. Was there a bug? Well, no, not exactly.
I can hear you now: Dammit, you computer people are always equivocating!
Did you even read the title of this blog? I am busy with the pedantic pontification, here. Anyway, back to my technical audience.
The iPhone has two types of memory: RAM and flash. You can try to find information about the iPhone's innards in the links below:
iPhone technical specs
Oh, wait, I'm so silly. Technical specifications do not have pictures with cool mirror effects. I was momentarily blinded by the chrome, and all the musicians dancing about with their stage lights.
By the way, if someone wants to figure out the exact numbers, here are a few starting points:
Flash transfer rates from ArsTechnia - Keep in mind this is IDE over USB.
Flash transfer rates from AnandTech - A look at the iPhone's insides (not for the squemish!)
iPod Nano strip tease - get it while it's hot.
iPhone memory bandwidth calculation:
Let's start with the 620Mhz ARM
(or is it 400MHz? Psych! We're not telling! - Love, Apple)
Ok, fine. X million cycles per second, maximum 4 bytes/cycle
Take into account thumb mode, multiply by 16 Megarods to the hogshead, divide by a black turtleneck, all over a messenger bag. Aw, stuff it.
The bottom line is, I have no idea how fast the iPhone can transfer data from flash to main memory, but it's a damn sight slower than the transfer rate between main memory and the CPU.
When you start an application, if there is not enough memory to hold that app, stuff is pushed out, into flash.
Likely offenders: Web browser, heavy games you've downloaded.
Either the UI elements (or the code being called by them) are not cached in RAM, or a lot of processing is happening between each keystroke. My programmer's intuition says it's the former, because it doesn't seem related to the complexity of the code I assume is being run when the button is pressed. There are a couple other reasons I think this, of which more later.
So, how much memory do I have on this thing, anyway? Brace yourself, for I am about to reveal: CPU and memory data! On the Internet!
iPhone CPU and memory secrets
The iPhone probably has 128mb, with about 90mb available to applications (and likely less with each firmware update!)
Typical scenario: I've got 7 web pages open, and I want to get my email on. Damn - we're using 89mb, and the email app needs 5mb, right off the bat. Better start tossing some data. (wait 4 seconds) ok, great. now let's load the email app from flash into main memory - but not all of it, just the parts we need right now. Oh, wait, what's he doing? He clicked something! Better swap in the keyboard (wait 2 seconds). He pressed a KEY!! (wait 2seconds), again?!? He's pressing more keys? By the electronic gods, where will I find the RAM??
http://www.youtube.com/watch?v=DL7n9Vo7mJw
The agony.
This could be fixed by requiring applications to serialize their data when closed. It might make some apps start slower, but it would prevent us from losing our minds when we are trying to use an app with an unknown (and un-determinable) number of previously run apps hogging RAM.
Anyway, here's the fix:
http://nino.me.uk/?p=157
That's right - hold the home button for 8 seconds in your memory hogging app to "really" close it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment