If you have an Android phone running KitKat (4.4), you can get a performance and battery life boost by switching from the outdated Dalvik runtime. The runtime on your device is the sub-system that determines how applications and tasks run. The ART runtime is set to replace Dalvik. Although the Dalvik runtime did a decent job, it was still a major cause of bottlenecks on the system. Why? Because Dalvik is a Just-In-Time compiler. This type of compiler ran code at the moment it needed it. The newer ART runtime is an Ahead-of-Time compiler that processes application instructions before they are needed. This is much more efficient both for performance and battery life.
You have to understand one thing — ART has not been optimized for all devices and all apps. In fact, some apps won't even run under ART (in those cases, you have to switch back to Dalvik). Fortunately, the process of switching from one to the other is fairly painless. Also, the performance and battery life won't blow you away... yet. But with every update, ART gets better and better.
With that said, you should see an improvement by making the switch. I'll demonstrate how to switch from Dalvik to ART on a Verizon-branded HTC M8. You don't have to worry about bricking your phone with this — it's fairly innocuous.
Before you can enable the ART compiler, you first have to enable the Developer options. The HTC M8 tucks the Developer options away from sight. Here's how you enable them:
- Open Settings
- Scroll down to the bottom and tap About
- Tap Software Information
- Tap More
- Tap Build Number repeatedly until you are informed that you are now a developer
From Dalvik to ART (and back again)
Now that you're a developer, it's time to switch from Dalvik to ART. To do this, follow these steps (and make sure that your device is either fully charged or plugged in):
- Open Settings
- Scroll down and tap Developer options
- Locate and tap Select runtime (Figure A)
- Tap ART
- Tap OK to reboot the device
Switching the runtime on a Verizon-branded HTC M8.
During the reboot process, Android will have to optimize all apps, so this will take some time. At first, you might think something has gone wrong — it hasn't. Sit back and wait for the optimization to complete. Expect 20 to 60 minutes (depending upon how many apps you have installed) for this to complete. Once it's done, however, ART is ready to serve.
I will say that on the HTC M8, the performance increase was quite noticeable. Apps opened significantly faster (in some cases, instantly). I also switched the runtime on my Motorola Moto X to compare the increase in performance. However, the improvement on the Moto X wasn't as dramatic.
Have you tried switching to the ART compiler? If so, what was your experience? Let us know in the discussion thread below.
Get information about all things Android by automatically subscribing to TechRepublic's The Android Expert newsletter.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.