The #1 Nexus 7 News, Discussion and Fan Site!

2013 Nexus 7 Discussion Forums (2nd Generation, Nexus 7 FHD, Nexus 7.2) => New Nexus 7 Android OS (2nd Gen) => Topic started by: S.Prime on November 28, 2013, 04:34:49 PM

Title: ART vs Dalvik in KitKat
Post by: S.Prime on November 28, 2013, 04:34:49 PM
ART (Android Runtime) is replacing Dalvik, reducing app lag and increasing battery life in upcoming releases of Android, but we can test drive it on KitKat on the Nexus 7 2013 (Sorry the Nexus 7 2012 and the Nexus 10 do not have this feature). After initial testing, I will have to admit that there is a noticeable difference in app lag. So, if you want to eliminate the spinning icon when you open our favorite forum, switch to ART and watch it open instantly. Look for the install guide after the following quote.




Quoted from Android Police Here (http://www.androidpolice.com/2013/11/06/meet-art-part-1-the-new-super-fast-android-runtime-google-has-been-working-on-in-secret-for-over-2-years-debuts-in-kitkat/)

Quote
ART, which stands for Android Runtime, handles app execution in a fundamentally different way from Dalvik. The current runtime relies on a Just-In-Time (JIT) compiler to interpret bytecode, a generic version of the original application code. In a manner of speaking, apps are only partially compiled by developers, then the resulting code must go through an interpreter on a user's device each and every time it is run. The process involves a lot of overhead and isn't particularly efficient, but the mechanism makes it easy for apps to run on a variety of hardware and architectures. ART is set to change this process by pre-compiling that bytecode into machine language when apps are first installed, turning them into truly native apps. This process is called Ahead-Of-Time (AOT) compilation. By removing the need to spin up a new virtual machine or run interpreted code, startup times can be cut down immensely and ongoing execution will become faster, as well.
At present, Google is treating ART as an experimental preview, something for developers and hardware partners to try out. Google's own introduction of ART clearly warns that changing the default runtime can risk breaking apps and causing system instability. ART may not be completely ready for prime time, but the Android team obviously feels like it should see the light of day. If you're interested in trying out ART for yourself, go to Settings -> Developer options -> Select runtime. Activating it requires a restart to switch from libdvm.so to libart.so, but be prepared to wait about 10 minutes on the first boot-up while your installed apps are prepared for the new runtime. Warning: Do not try this with the Paranoid Android (or other AOSP) build right now. There is an incompatibility with the current gapps package that causes rapid crashing, making the interface unusable.


Installation Guide:

Step 1:

Go to Settings -> Developer options -> Select runtime -> Tap ART.

Step 2

Follow the prompt to restart the tablet.

Step 3

On restarting the OS will show "Updating Apps" followed by a 2nd updating prompt, which will require 5 to 10 minutes, so make sure you are sufficiently charged or connected to a power source. Reverting to Dalvik is accomplished by following the same procedure.

Note, not all apps are compatible, like WhatsApp, but so far I have found nothing incompatible. Remember that you should have your data backed up, before testing any feature like ART on your device. Personally, I made a nandroid backup before experimenting.

If you decide to try ART, post your results and thoughts.


Title: Re: ART vs Dalvik in KitKat
Post by: bjs229 on November 29, 2013, 12:16:51 AM
Tried it but several apps wouldn't open.

Sent from my Nexus 7

Title: Re: ART vs Dalvik in KitKat
Post by: S.Prime on November 29, 2013, 03:51:23 AM
I would guess that they were your gaming apps and since I am not a gamer, I don't have the same problem.

Sent from my Nexus 7 using Tapatalk

Title: Re: ART vs Dalvik in KitKat
Post by: bjs229 on November 29, 2013, 03:27:15 PM
Actually it was ipcamera viewer pro and AVG anti-virus... I kept getting pop up errors.. No games though

Sent from my Nexus 7
Title: Re: ART vs Dalvik in KitKat
Post by: bjs229 on November 29, 2013, 10:03:32 PM
I was away in Washington DC for the holiday and needed to use my ip cam app to keep an eye on my dogs while the sitter was here. While in the hotel room I made the switch and then had to go back... My dogs are family. I didn't give it a real shot. I am going to email the developers and see what they have to say. I personally saw a speed difference with other apps and would like to convert.

Sent from my Nexus 7