Thursday, November 07, 2013

ART, Android 4.4's secret Dalvik replacement revealed

Android 4.4 or KitKat is still relegated to only one device -- at the time of this writing -- the Nexus 5. Tucked into the Developer Menu in Settings, though, is something far newer than a feature: It's something called ART and it's designed to speed up every app in your system, GigaOm reported Wednesday afternoon.

ART stands for Android Runtime. Currently, Android apps are written in Java and run in Dalvik, a runtime environment that is known as a "just in time" compiler. It compiles Java bytecode "on demand" so that Android can run it.

ART, on the other hand, is an Ahead-Of-Time (AOT) compiler. When an app is installed, it is compiled into native code. This should mean faster app startup, faster execution and better battery life.

According to Cody Toombs at Android Police, Google has been working on this in secret for more than two years. The timing is probably not coincidental; it was about one-and-a-half years ago, in May of 2012, that courts decided that Google didn’t infringe on Oracle’s Java-related patents with its use of Dalvik.

ART is not enabled in Android yet. However, 4.4 includes a preview of the technology; by going into Developer settings and entering the Select Runtime submenu. There, either Dalvik or ART can be selected. A reboot will occur, and Android will optimize the device's apps to run.

Developers can use this to test their apps for compatibility and can report issues to Google.

No comments: