{"title":"Android Graphics Truth Facts","html_url":"https://deallocatedobjects.com/posts/android-graphics-truth-facts","source_url":"https://plus.google.com/100838276097451809262/posts/VDkV9XaJRGS","markdown_content":"[Andrew Munn](https://twitter.com/#!/andrewmunn) points out a simple truth about Android vs. iOS graphics rendering:\r\n\r\n> It’s because on iOS all UI rendering occurs in a dedicated UI thread with real-time priority.\r\n\r\nHe also clarifies:\r\n\r\n> 1. Compositing and previously set-up animations—all the stuff that involves the Core Animation rendering layer tree—do indeed happen on a background thread. \r\n\r\n> 2. 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.\r\n\r\n> 3. 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.\r\n\r\nI love that we're finally starting to see some in-depth writing about the meat of these issues. \r\n\r\nPretty 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.","html_content":"<p><a href=\"https://twitter.com/#!/andrewmunn\">Andrew Munn</a> points out a simple truth about Android vs. iOS graphics rendering:</p>\n\n<blockquote>\n<p>It’s because on iOS all UI rendering occurs in a dedicated UI thread with real-time priority.</p>\n</blockquote>\n\n<p>He also clarifies:</p>\n\n<blockquote>\n<ol>\n<li><p>Compositing and previously set-up animations—all the stuff that involves the Core Animation rendering layer tree—do indeed happen on a background thread. </p></li>\n<li><p>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.</p></li>\n<li><p>In naively written code, all developer-written code would occur on the main thread. However, Apple provides very easy APIs (Grand Central Dispatch and <code>NSOperation</code>) 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.</p></li>\n</ol>\n</blockquote>\n\n<p>I love that we’re finally starting to see some in-depth writing about the meat of these issues. </p>\n\n<p>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.</p>","created_at":"2013-11-16T05:10:25.612Z","updated_at":"2013-11-16T05:10:25.612Z"}