The Reason Android is Laggy
Andrew Munn, an engineering intern at Google, responding to this post by Dianne Hackborn, an Android Framework Engineer:
It’s not GC pauses. It’s not because Android runs bytecode and iOS runs native code. It’s because on iOS all UI rendering occurs in a dedicated UI thread with real-time priority. On the other hand, Android follows the traditional PC model of rendering occurring on the main thread with normal priority.
This is a not an abstract or academic difference. You can see it for yourself. Grab your closest iPad or iPhone and open Safari. Start loading a complex web page like Facebook. Half way through loading, put your finger on the screen and move it around. All rendering instantly stops. The website will literally never load until you remove your finger. This is because the UI thread is intercepting all events and rendering the UI at real-time priority.
Munn goes on to list four other related reasons that help explain the lag that persists throughout Android. Some of the technical discussion in these two posts gets a little beyond my capacity, but they’re great reads if you want some insight into the issue from people who just might actually know what they’re talking about.
Very nicely put.
This is one reason why most Objective-C advice I get these days distills to, “If it’s not UI, put it on another thread.” Code that facilitates threading, like blocks and Grand Central, were practically the unofficial theme of WWDC this year.
Come to think of it, Grand Central is perhaps one of the most underreported assets of iOS.
In a nutshell, Grand Central is a technology which makes it very easy for developers to create code that utilizes multiple processing cores. Rather than building an app that handles all the different processor cases which might be present, developers hand functions to Grand Central, which efficiently dispatches the code to whatever resources are available.
Why is this a major asset to Apple and developers? Because applications which utilize Grand Central practically scale for free. My iPhone 4 has one core, my iPad 2 has 2, and my Mac has 4. Code imbued with Grand Central takes advantage of each environment. This becomes even more essential when you consider future products. At WWDC, Apple kept ringing the Grand Central bell, partially because iPhone apps developed with GC earned a free speed boost when the dual-core 4S was announced months later.
Now compare this ecosystem to that of Android, which leaves numerous phones and apps behind with each new OS flavor…
103 notesShowHide
-
selena12gomez liked this
-
diana2345d liked this
-
roguecnidarian reblogged this from jstn
-
johndaily liked this
-
willrsmith reblogged this from chartier
-
advent-seph liked this
-
ihdetfebce liked this
-
marvinmatic liked this
-
joshuacerbito liked this
-
mindiscountuggssale liked this
-
ccar2 reblogged this from chartier
-
grrrgrace liked this
-
dernullmeridian liked this
-
jimcloudman liked this
-
thenoobyorker liked this
-
topherchris liked this
-
chartier reblogged this from jstn and added:
couple of general details about how iOS...Google engineering intern, about why Android
-
buzz liked this
-
nickoras liked this
-
jairaffe liked this
-
warlorderol liked this
-
eldrek liked this
-
deadph0x liked this
-
megmance liked this
-
decause liked this
-
envee liked this
-
feindre liked this
-
konistehrad reblogged this from chartier and added:
Killer writeup. Didn’t know that elements in...weren’t composited individually by the GPU,...
-
joeross liked this
-
jm3 liked this
-
ahandsomeshark liked this
-
joshua liked this
-
feltron liked this
-
mattheweternal liked this
-
berbaquero reblogged this from chartier
-
hendrasaputra liked this
-
zachklein liked this
-
joshmohrer liked this
-
tronburgers liked this
-
crazygarywang reblogged this from chartier
-
hunterpryor liked this
-
haseman said:
reads like the opening paragraph to yours and Buzz’s book
-
sevencats reblogged this from dbreunig
-
kmccmk9 reblogged this from chartier
-
engers reblogged this from chartier and added:
An excellent read.
-
daptone reblogged this from kerm3r and added:
For as much as I miss my Droid, I also like being able to actually do stuff on my phone.
-
kerm3r reblogged this from chartier
-
dbreunig reblogged this from chartier and added:
Very nicely put. This is one reason why most Objective-C advice I get these days distills to, “If it’s not UI, put it on...
-
This was featured in #Tech
- Show more notes