Andrew Munn points out a simple truth about Android vs. iOS graphics rendering:
It’s because on iOS all UI rendering occurs in a dedicated UI thread with real-time priority.
He also clarifies:
Compositing and previously set-up animations—all the stuff that involves the Core Animation rendering layer tree—do indeed happen on a background thread.
Drawing new content into Core Animation layers and setting up their animations happens on the main thread. This is the same thread that user interface actions occur on.
In naively written code, all developer-written code would occur on the main thread. However, Apple provides very easy APIs (Grand Central Dispatch and
NSOperation
) to move things into system-managed background threads. In iOS 5, you can even declare that a Core Data (object-relational database) context cannot be used directly on the main thread.
I love that we're finally starting to see some in-depth writing about the meat of these issues.
Pretty much everyone I speak to on a regular basis tells me "Android just feels laggy" or something of that nature. I can't speak to the specific causes of Android's hiccups in this department, but Andrew's post sounds pretty accurate to me in regards to Core Animation and UIKit rendering behavior.