Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,738,867 Members 41,497 Now Online
XDA Developers Android and Mobile Development Forum

Using ART as runtime

Tip us?
 
startracker
Old
(Last edited by startracker; 21st May 2014 at 05:55 PM.)
#1  
startracker's Avatar
Senior Member - OP
Thanks Meter 196
Posts: 442
Join Date: Mar 2014
Location: MUMBAI
Default Using ART as runtime



ART] is a new Android runtime being introduced experimentally in the 4.4 release. This is a preview of work in progress in KitKat that can be turned on in Settings > developer options. This is available for the purpose of obtaining early developer and partner feedback.

Important: Dalvik must remain the default runtime or you risk breaking your Android implementations and third-party applications.

I just booted my phone in ART runtime from developer options.


ART vs Dalvik / AOT vs JIT

Android apps are deployed in Dalvik bytecode, which is portable, unlike native code. In order to be able to run the app on a device, the code has to be compiled to machine code.

Dalvik is based on*JIT (just in time) compilation. It means that each time you run an app, the part of the code required for its execution is going to be translated (compiled) to machine code at that moment. As you progress through the app, additional code is going to be compiled and cached, so that the system can reuse the code while the app is running. Since JIT compiles only a part of the code, it has a smaller memory footprint and uses less physical space on the device.

ART, on the other hand, compiles the intermediate language, Dalvik bytecode, into a*system-dependent binary. The whole code of the app will be pre-compiled during install (once), thus removing the lag that we see when we open an app on our device. With no need for JIT compilation, the code should execute much faster.

Except for the potential speed increase, the use of ART can provide an important secondary benefit. As ART runs app machine code directly (native execution), it doesn't hit the CPU as hard as just-in-time code compiling on Dalvik. Less CPU usage results in less battery drain, which is a big plus for portable devices in general.

ADVANTAGES

> increased speed in CPU floating operations by approx. 20%
> increased speed in RAM operations by approx. 10%
> increased speed in storage operations by approx. 10%
> CPU integer operations - slight advantage goes to Dalvik


Pretty neat, don't you agree? There is one more hidden, but very important benefit of ART. When you ask iPhone users how they feel about the look and feel of Android smartphones, they often complain thatAndroid feels laggy, despite the fact that hardware on both phones is top notch. Perceived lag/delay is the result of JIT compilation and it more or less disappears after switching to ART.

If u want to experience it just try it out.

CAUTION
THE BOOT TIME IS TOO LONG ,JUST DONT SWITCH OFF PHONE BY GETTING SCARED IT'S ALRIGHT


REGARDS,
#startracker



Sent from my XT1022 using XDA Free mobile app
The Following User Says Thank You to startracker For This Useful Post: [ Click to Expand ]
 
tamilmad
Old
#2  
Member
Thanks Meter 18
Posts: 57
Join Date: Jan 2012
Default Antutu and Quadrant BM results with ART

In my Nexus 7, There was a definite and good improvement in both the benchmark results.

But in MOTO E I was surprised that with ART both the BM scored much lower scores (Antutu 12500 with dalvik and 11700 with ART in Quadrant 5166 with Dalvik and 3350 with ART). Hence I have reverted to Dalvik Cache in my Moto E.

Please do post your results.

Regards
 
5hubh4m
Old
#3  
Member
Thanks Meter 13
Posts: 36
Join Date: Jan 2013
Location: Meerut
I booted my E with ART, the results, well, just saying I wasn't satisfied. Most of my games disappeared from the launcher, internal storage jumped from 500 MB to 1.1 GB(That was expected), and the whole system lagged like hell. I have no clue why. So I quickly reverted to Dalvik. I guess in the next update It'll be better. BTW did you notice the same issues.
 
startracker
Old
#4  
startracker's Avatar
Senior Member - OP
Thanks Meter 196
Posts: 442
Join Date: Mar 2014
Location: MUMBAI
I faced interface laggy !

Sent from my XT1022 using XDA Free mobile app
OWNER OF OPEN HOME PORT PROJECT
 
SArnab©®
Old
#5  
SArnab©®'s Avatar
Senior Member
Thanks Meter 1609
Posts: 1,871
Join Date: Dec 2012
Location: Asansol

 
DONATE TO ME
Well I had a totally opposite experience...

At first the mob got heated a lot while starting up.
Then there was some lag.
But after that the mob became fast...

I didnt saw any storage jump tooo...

Sent from my C2004 using Tapatalk
Mobile Phone : Sony Xperia™ M Dual C2004 | Android 4.3 Stock Rooted | Locked Bootloader | Xposed Framework.
Tablet : Samsung Galaxy Tab 3 8.0 SM-T311 | Android 4.2.2 Stock

Xposed Modules : Android Theme Engine a.k.a. ExThemer | Android Apps Theme Engine a.k.a. ExThemer 2


Android Apps : Google Play Link

Guides :
Guide To Re-Lock The Boot-Loader Of Any Sony Xperia Device If Ta Partition Backup Done Before Unlocking
[Guide/Tutorial][JB 4.3+]Create Your Own Xperia Theme

 
startracker
Old
#6  
startracker's Avatar
Senior Member - OP
Thanks Meter 196
Posts: 442
Join Date: Mar 2014
Location: MUMBAI
Quote:
Originally Posted by SArnab©® View Post
Well I had a totally opposite experience...

At first the mob got heated a lot while starting up.
Then there was some lag.
But after that the mob became fast...

I didnt saw any storage jump tooo...

Sent from my C2004 using Tapatalk
Yes after an hour or so it becomes cool .I am gonna be permanently on ART NOW

Sent from my XT1022 using XDA Free mobile app
OWNER OF OPEN HOME PORT PROJECT
 
SArnab©®
Old
#7  
SArnab©®'s Avatar
Senior Member
Thanks Meter 1609
Posts: 1,871
Join Date: Dec 2012
Location: Asansol

 
DONATE TO ME
Quote:
Originally Posted by startracker View Post
Yes after an hour or so it becomes cool .I am gonna be permanently on ART NOW

Sent from my XT1022 using XDA Free mobile app
Well cor me it was lag free within a minute after boot.

But yes Antutu rating falled by 400...

Sent from my XT1022
Mobile Phone : Sony Xperia™ M Dual C2004 | Android 4.3 Stock Rooted | Locked Bootloader | Xposed Framework.
Tablet : Samsung Galaxy Tab 3 8.0 SM-T311 | Android 4.2.2 Stock

Xposed Modules : Android Theme Engine a.k.a. ExThemer | Android Apps Theme Engine a.k.a. ExThemer 2


Android Apps : Google Play Link

Guides :
Guide To Re-Lock The Boot-Loader Of Any Sony Xperia Device If Ta Partition Backup Done Before Unlocking
[Guide/Tutorial][JB 4.3+]Create Your Own Xperia Theme

 
startracker
Old
#8  
startracker's Avatar
Senior Member - OP
Thanks Meter 196
Posts: 442
Join Date: Mar 2014
Location: MUMBAI
I am getting less battery drain even after watching videos for half an hour that's cool

Sent from my XT1022 using XDA Free mobile app
OWNER OF OPEN HOME PORT PROJECT
 
startracker
Old
#9  
startracker's Avatar
Senior Member - OP
Thanks Meter 196
Posts: 442
Join Date: Mar 2014
Location: MUMBAI
I had a chat with a dev of MOTO e ,he said the work of ART is incomplete it will be fixed with next update

Sent from my XT1022 using XDA Free mobile app
OWNER OF OPEN HOME PORT PROJECT
 
TacTieTee
Old
#10  
TacTieTee's Avatar
Member
Thanks Meter 11
Posts: 99
Join Date: Sep 2012
Location: Mumbai
i switched to ART, boot time wasnt that long and even the phone is cool as yet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes