Approximate time to read: 2 minutes
What if I told you there’s a change you can make to your Android phone that will increase app speed and improve battery life but doesn’t involve turning anything off?
First of all, we need to understand how programs work. Programs, or apps, are written in languages that are ideal for humans to understand. The processor in your computer, phone or tablet, though, needs a feed of 1’s and 0′. In-between these two stands the compiler – it converts the programmer written code into something that processor understands.
By default, Android uses a “runtime” called DALVIK. As part of this is “just in time” compiler – that is, it compiles the code as it’s run. However, Android has a second runtime – ART (Android Run Time) and, come the next Android release, is due to replace DALVIK as the runtime of choice. ART compiles all the code “up front”.
So, the advantages and disadvantages of ART are…
- By compiling everything initially, no further compilation is required during the program run. This means app launch quicker and run more smoothly.
- By getting rid of all that processing each time you run an app, it improved battery life.
- All the compiled code has to be stored, so this means more memory is used.
- App installations take longer as the one-off compilation has to take place.
The fact that ART will be the default method later in the year shows how confident Android is that the advantages outweigh the disadvantages. I’m running ART and can genuinely say I’ve seen an obvious improvement in speed, although it’s too early to see if the battery life is any better.
How to Switch from DALVIK to ART
Although it will become the default with Android “L” you can probably switch now (although the option may not be available on some devices).
- Head into Settings – near the bottom of the list there may be an option named “Developer Options”. If there isn’t, you’ll need to do the following…
- In Settings click on “About phone”. At the bottom it should list your “Build number”. Tap this a number of numbers until it says you’re a developer.
- If you now head back to the Settings menu you should see that “Developer Options” has now appeared.
- Now go into “Developer Options” and look for “Select runtime”
- Click on this and change it to “Use ART”.
- Your phone will reboot and your apps will be compiled – this may take some time as it’s a slow process. Expect your phone to be out of action for at least half an hour.
- It should boot up and… voilà. You’re now using ART. If you don’t like it, you can always change it back to DALVIK.
The screenshots below may help further.