Avatar
I'm Drew Breunig and I obsess about technology, media, language, and culture. I live in New York, studied anthropology, and work in advertising technology.

These are reactions to things I feel are important.

Follow me on Twitter.

The Reason Android is Laggy 

chartier:

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…

Source: chartier

103 notesShowHide

  1. roguecnidarian reblogged this from jstn
  2. willrsmith reblogged this from chartier
  3. ccar2 reblogged this from chartier
  4. chartier reblogged this from jstn and added:
    couple of general details about how iOS...Google engineering intern, about why Android
  5. konistehrad reblogged this from chartier and added:
    Killer writeup. Didn’t know that elements in...weren’t composited individually by the GPU,...
  6. berbaquero reblogged this from chartier
  7. crazygarywang reblogged this from chartier
  8. haseman said: reads like the opening paragraph to yours and Buzz’s book
  9. sevencats reblogged this from dbreunig
  10. kmccmk9 reblogged this from chartier
  11. engers reblogged this from chartier and added:
    An excellent read.
  12. 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.
  13. kerm3r reblogged this from chartier
  14. 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...
  15. This was featured in #Tech